Re: defining vars within functions as global
| From: | Justin French | Date: | Sat, 07 Sep 2002 01:44:50 +0000 |
| Subject: | Re: defining vars within functions as global | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-115584@lists.php.net to get a copy of this message | ||
on 06/09/02 10:45 PM, Michael Sims (mhsims@midsouth.rr.com) wrote:
> How about this:
>
> <?
> function foo()
> {
> return array (
> "foo" => "aaa",
> "bar" => "bbb"
> );
> }
>
> extract(foo());
>
> echo $foo;
> echo $bar;
> ?>
Very cool !! -- thanks to everyone's replies.
Justin