Page 1 of 1

Question concerning globals...

Posted: Tue Apr 01, 2003 2:08 pm
by Jim
This is surely a stupid question, but it's one I can't surmise the answer to.

In code I've seen, in this case Invision Power Board code, stuff like this can be found at the beginning of the script:

Code: Select all

globals $this $that $other;
What exactly does that mean??? Where are these globals defined?

An explanation would be so very welcomed.

Thanks for your help!

Posted: Tue Apr 01, 2003 2:48 pm
by volka
http://www.php.net/manual/en/language.v ... .scope.php explains it.
those variables can be set anywhere :(

Posted: Tue Apr 01, 2003 5:02 pm
by McGruff
And: print_r($GLOBALS) will show you what's there in a given script.