note 16862 deleted from language.variables.scope by jimw
| From: | jimw@php.net | Date: | Sat, 08 Dec 2001 21:42:05 +0000 |
| Subject: | note 16862 deleted from language.variables.scope by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22214@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