RE: [PHP] Purpose of $$var ?????
| From: | joakim dot andersson at cybercom dot se | Date: | Tue, 16 Jul 2002 14:12:22 +0000 |
| Subject: | RE: [PHP] Purpose of $$var ????? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-107869@lists.php.net to get a copy of this message | ||
The cause for your problem would be that register_globals defaults to off in
PHP 4.2.x and greater.
The solution? Start using the new superglobals ($_POST, $_GET, $_SESSION
etc) or (not recomended) set register_globals = on in php.ini
Read more here:
http://www.php.net/manual/en/language.variables.predefined.php
Regards
Joakim Andersson
> -----Original Message-----
> From: Scott Fletcher [mailto:scott@abcoa.com]
> Sent: Tuesday, July 16, 2002 3:54 PM
> To: php-general@lists.php.net
> Subject: [PHP] Purpose of $$var ?????
>
>
> 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
>