Simple function question
| From: | Matt Babineau | Date: | Thu, 09 May 2002 19:02:04 +0000 |
| Subject: | Simple function question | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13659@lists.php.net to get a copy of this message | ||
Ok, I just read a section in a book about functions. In my cost I have
some variables set:
$var1 = "1";
And I have a function I wrote that needs to utilize that variable.
function runvar() {
query database looking for $var1;
}
I get horrible errors though. In the book it talked about the local
fuciton scope not being able to communicate with the global scope. How
can I pass $var1 into the function so it can be used?
Matt Babineau
Freelance Internet Developer
-----------------------------------------
e: <mailto:mbabineau@illuminatistudios.com>
mbabineau@illuminatistudios.com
p: 603.943.4237
w: <http://www.illuminatistudios.com/> http://www.illuminatistudios.com