Re: global
| From: | Juan carlos | Date: | Wed, 09 Aug 2000 17:05:28 +0000 |
| Subject: | Re: global | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-10958@lists.php.net to get a copy of this message | ||
I am agree, you should use an array, but you have variable of variable too.
for( $i=0; $i<$max_vbl; $i++)
{
$vbl = "f" . $i;
global $$vbl;
}
>Hi,
>
>With that variable structure I woud suggest an array.
>$f[1], $f[2], $f[3], $f[4]
>then you would make $f global and get access to all the elements.
>- Frank
>Hello...
>
>If I have a bunch of variables... $f1, $f2, $f3, $f4.. etc.. that are all
>named $f - then a number - and I want to define all the "$f" variables as
>global within a function, is there an easy way to do this without naming
>every variable?
>
>Thanks,
>Dustin Leggans
>
>
>__________________________________________________
>Do You Yahoo!?
>Talk to your friends online with Yahoo! Messenger.
>http://im.yahoo.com
>
>--
>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
>
>
>