note 14664 added to language.variables.variable.php
| From: | chrisNOSPAM at kampmeier dot net | Date: | Wed, 08 Aug 2001 14:40:37 +0000 |
| Subject: | note 14664 added to language.variables.variable.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-16478@lists.php.net to get a copy of this message | ||
Note that normal variable variables will not be parsed in double-quoted strings. You'll have to
use the braces to make it work, to resolve the ambiguity. For example:
$varname = "foo";
$foo = "bar";
print $$varname; // Prints "bar"
print "$$varname"; // Prints "$foo"
print "${$varname}"; // Prints "bar"
http://www.php.net/manual/en/language.variables.variable.php