RE: [PHP] quick globalisation?

From: Date: Mon, 23 Aug 2004 15:38:13 +0000
Subject: RE: [PHP] quick globalisation?
Groups: php.general 
Request: Send a blank email to php-general+get-194480@lists.php.net to get a copy of this message
[snip] Is there a quicker way to globalise something other than: $a = 'foo'; $b = 'bah'; ... $GLOBALS['a'] = $a; $GLOBALS['b'] = $b; ?? I was hoping for something like $a = 'foo'; $b = 'bah'; ... makeGlobal('a','b') /*or*/ makeGlobal($a,$b); [/snip] According to http://us3.php.net/language.variables.scope you could do something like global $a, $b, $c, ...;

« previous php.general (#194480) next »