Re: global $GLOBALS ??? 2nd...
| From: | Wico de Leeuw | Date: | Thu, 12 Oct 2000 08:25:36 +0000 |
| Subject: | Re: global $GLOBALS ??? 2nd... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-19778@lists.php.net to get a copy of this message | ||
At 09:44 12-10-00 +0200, Berthold Tenhumberg wrote:
Is there a way to get all global variables in a function readable? For example: 1 function bla() {Hiya Dirty but works, But why won't you just use global $var name.... this is *alot* of overhead: function Bla () {2 global $GLOBALS; 3 echo $my_global_var;4 }
foreach($GLOBALS AS $name => $value) {
$$name = $value;
}
ho $my_global_var;
}
Greetz,
Wico
Line 2 is not working... Why? -- Berthold Tenhumberg (live long and prosper...) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net