Re: Purpose of $$var ?????
| From: | Andrey Hristov | Date: | Tue, 16 Jul 2002 13:57:15 +0000 |
| Subject: | Re: Purpose of $$var ????? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107866@lists.php.net to get a copy of this message | ||
Variable variable. Read the docs.
$v = 'foo';
$foo = 'bar';
echo $$v;
Regards,
Andrey
P.S.
Sometimes {} are used : ${$v}
"Scott Fletcher" <scott@abcoa.com> wrote in message
news:<20020716135017.43862.qmail@pb1.pair.com>...
> The script was working great before PHP 4.2.x and not after that. So, I
> looked through the code and came upon this variable, "$$var". I have no
> idea what the purpose of the double "$" is for a variable. Anyone know?
>
> --clip--
> $var = "v".$counter."_high_indiv";
> $val3 = $$var;
> --clip
>
> Thanks,
> FletchSOD
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>