note 16862 added to language.variables.scope

From: Date: Fri, 16 Nov 2001 07:10:54 +0000
Subject: note 16862 added to language.variables.scope
Groups: php.notes 
Request: Send a blank email to php-notes+get-20910@lists.php.net to get a copy of this message
Any variables, defined in the local scope in function, represents in $GLOBALS array with the name of the variable. So, <? $hello = "world"; echo($GLOBALS["hello"]); ?> Will print "world". Be careful, when you using a variable with name, for example, "a", and GLOBALS["a"] already defined, there are possible to get an unpedictable results. wbr., Ilya Basalaev a.k.a. Scarab -- http://www.php.net/manual/en/language.variables.scope.php http://master.php.net/manage/user-notes.php?action=edit+16862 http://master.php.net/manage/user-notes.php?action=delete+16862 http://master.php.net/manage/user-notes.php?action=reject+16862

« previous php.notes (#20910) next »