Re: $$ <----What's with this?
| From: | John Biesnecker | Date: | Thu, 26 Oct 2000 13:12:30 +0000 |
| Subject: | Re: $$ <----What's with this? | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-3515@lists.php.net to get a copy of this message | ||
It is a variable variable... best way to explain is an exampl...
$varone = 0;
$vartwo = "varone";
$$vartwo = 4;
echo ($varone);
would output "4". What it is doing is taking the value in vartwo as the
variable name to assign four to. It's a sort of tricky concept, one that
I don't use very often myself, but I'm pretty sure that's how it works.
John Biesnecker
amraam@ao.net
On Thu, 26 Oct 2000, Asendorf, John wrote:
> Someone want to explain the construct -
>
> $$var_name
>
> to me? What's with the double '$'s?
>
> ---------------------
> Founder of
> The 'What Kind of Idiot Uses PHP with IIS with Oracle on NT?' Consortium
>
> Members: John Asendorf, Thomas Kryger, Florian Clever
>
> John Asendorf - jasendorf@lcounty.com
> Web Applications Developer
> http://www.lcounty.com - NEW FEATURES ADDED DAILY!
> Licking County, Ohio, USA
> 740-349-3631
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-windows-unsubscribe@lists.php.net
> For additional commands, e-mail: php-windows-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>