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

From: Date: Thu, 26 Jan 2006 14:43:31 +0000
Subject: Re: [SOLVED] Re: usr VAR value as a VAR Name
References: 1 2 3 4 5 6 7  Groups: php.general 
Request: Send a blank email to php-general+get-229313@lists.php.net to get a copy of this message
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

« previous php.general (#229313) next »