A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearWhere to find the reference for the double dollar PHP syntax? - page 1
User InfoPosts
Where to find the reference for the double dollar PHP syntax?#1
i hope that everyone here know the php (variable variable( syntax:

$color = (red(;
$red = (yes, im red(;
echo $$color;
//output: (yes, im red(;


but my problem is: how this syntax is named?
i(m trying to find the reference on php.net, with no results (i wanna know if this feature will be kept in php6, the others attributes, etc...)

posted date: 2009-04-14 05:37:00


Re: Where to find the reference for the double dollar PHP syntax?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-14 05:37:01


Re: Where to find the reference for the double dollar PHP syntax?#3
Variable VariablesAnd yes it will be kept in PHP6 as far as I know.

posted date: 2009-04-14 05:38:00


Re: Where to find the reference for the double dollar PHP syntax?#4
Ooo, 10 seconds faster. you can have it. ;)

posted date: 2009-04-14 05:39:00


Re: Where to find the reference for the double dollar PHP syntax?#5
<3 You win sometimes though :)

posted date: 2009-04-14 05:40:00


Re: Where to find the reference for the double dollar PHP syntax?#6
What keyword did u use to find that page?

posted date: 2009-04-14 05:41:00


Re: Where to find the reference for the double dollar PHP syntax?#7
Just to share some tips.To avoid confusion, you may use the curly braces.${$color}One of my team member removed the double $, thinking of typo error. Perhaps doing so will avoid confusion.

posted date: 2009-04-14 05:42:00


Re: Where to find the reference for the double dollar PHP syntax?#8
Oh, ok, just sitch the select to 'online documentation'..lol

posted date: 2009-04-14 05:43:00


Re: Where to find the reference for the double dollar PHP syntax?#9
Variable variable in PHP

posted date: 2009-04-14 05:44:00


Re: Where to find the reference for the double dollar PHP syntax?#10
"php variable variable" in Google, 1st result. Come on, man. Just kidding. Kind of. :)

posted date: 2009-04-14 05:45:00


Re: Where to find the reference for the double dollar PHP syntax?#11
+1 Nice tip. When reading code that I wrote months ago and see a double-dollar I sometimes get a little confused. Seconds later I realize what it´s meaning :)

posted date: 2009-04-14 05:55:00


Re: Where to find the reference for the double dollar PHP syntax?#12
lol i just wrote 'variable variable' on php.net, without see that the default choice is 'function list' and this case, is not a function :)

posted date: 2009-04-14 07:16:00


select page: « 1 2 »
Copyright ©2008-2017 www.momige.com, all rights reserved.