Posted by Tommy Gildseth on 02/25/06 17:23
Chung Leong wrote:
>
> function bobo_the_clown($code) {
> // map in global variables
> $global_vars = array_keys($GLOBALS);
> foreach($global_vars as $var) {
> if($var !== 'GLOBALS') {
> $$var =& $GLOBALS[$var];
> }
> }
extract($GLOBALS); may seem like a better choice.
I did think about suggesting that, but though that it would make the
script to inefficient to be usefull.
--
Tommy Gildseth
http://design.twobarks.com/
Navigation:
[Reply to this message]
|