Re: [SOLVED] Re: usr VAR value as a VAR Name
| From: | Barry | Date: | Fri, 27 Jan 2006 08:14:01 +0000 |
| Subject: | Re: [SOLVED] Re: usr VAR value as a VAR Name | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-229358@lists.php.net to get a copy of this message | ||
Chris Boget wrote:
Try what? ^_^Try it and see. ;)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.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.
Never happened to me ;) I mostly look at the screen programming :) PHP - Best coded with: Open eyes O_O -- Smileys rule (cX.x)C --o(^_^o)And on top of that, i wont let anyone code in my PHP docs who doesn't know what $$var is or does!!Agreed. But there have been a few times when I accidently added in an extra $ to the variable and, consequently, didn't get the results I expected.