Chris Boget wrote:
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
And When I use this and when i use that. Oh i like this ^_^
Btw. my working buddys said on first view your example looked more wrong.

And on top of that, i wont let anyone code in my PHP docs who doesn't know what $$var is or does!!

Greets
        Barry

--
Smileys rule (cX.x)C --o(^_^o)

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

Reply via email to