Forum Moderators: coopster

Message Too Old, No Replies

What is meaning of $$<Var name>

$$, Php variable

         

compose

7:16 am on Oct 4, 2005 (gmt 0)

10+ Year Member



Hello,

Can any body tell what is the meaning of $$<Var_Name> in php. Generally we use $<Var_name> to declare a veriable. Then what is the significance of additional $.

Vineet

dcrombie

7:44 am on Oct 4, 2005 (gmt 0)



It's called a 'variable variable'. You can also write it as ${"$Var_Name"} which might make more sense ;)

jatar_k

3:22 pm on Oct 4, 2005 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



[php.net...]

killroy

5:21 pm on Oct 4, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Basically it will access te value of the variable with a name euqal to tthe value of the inner variable.

if $foo="bar" and $bar=26, then $$foo=26

Killroy

compose

5:47 am on Oct 5, 2005 (gmt 0)

10+ Year Member



Thanx to all for ur reply, I got it now..

Vineet