Re: [SOLVED] Re: usr VAR value as a VAR Name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



echo $$foo

Let me start by saying there is nothing wrong with the above and it's doing exactly what the OP needed. However, when I use variable variables, I prefer to use the following notation:

${$foo}

It makes the coder's intention clear and makes it so that it can't be mistaken for a possible typo when someone comes in after the fact to maintain the code.

thnx,
Chris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux