[thelist] PHP variable scoping

deboute benjamin deboute at nerdsoul.com
Tue Aug 22 13:33:46 CDT 2000


At 13:21 22/08/00 -0400, you wrote:
>b. and I could define an array and stick values into it and keep 'em all
>global no matter where I set them.


GLOBAL variables ARE put in a in-built array 

i.e
<?
$var='bar';

function foo() {
GLOBAL $var;
echo $var;
}

function foo() {
GLOBAL["var"];
}
?>






More information about the thelist mailing list