pass globals to functions???
| From: | Shawn McKenzie | Date: | Thu, 24 Oct 2002 19:52:07 +0000 |
| Subject: | pass globals to functions??? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-121343@lists.php.net to get a copy of this message | ||
Some have eluded to this but I haven't seen a working example. I would like
to declare globals in my main script and then inside functions that need
these globals just somehow use the $GLOBALS or something to declare the
variables global in the function.
What I've seen eluded to is loading your $GLOBALS array into an array...
In short, if I add a variable to my globals line in my main script, I don't
want to have to go and add it to the functions that need it. Make sense???
TIA
-Shawn