Re: defining vars within functions as global

From: Date: Fri, 06 Sep 2002 12:45:13 +0000
Subject: Re: defining vars within functions as global
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-115445@lists.php.net to get a copy of this message
On Fri, 06 Sep 2002 13:52:08 +1000, you wrote: >Hi, > >I'd like to be able to define multiple variables within a function, and have >it available outside the function from the point the function is called... How about this: <? function foo() { return array ( "foo" => "aaa", "bar" => "bbb" ); } extract(foo()); echo $foo; echo $bar; ?>

« previous php.general (#115445) next »