note 61476 added to language.variables.variable
| From: | Mephist0 | Date: | Sat, 04 Feb 2006 19:43:56 +0000 |
| Subject: | note 61476 added to language.variables.variable | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103003@lists.php.net to get a copy of this message | ||
Wrong case :
$a = "hello";
$b = "world";
${$a}{$b} = "Wrong";
or
${$a} . "_" . {$b} = "Wrong";
Case :
${$a . "_" . $b} = "You got it";
print $hello_world; // Prints "You got it";
${$a . $b} = "You got it again";
print $helloworld; // Prints "You got it again";
--------------------------
Simple casses but... very helpfull...
----
Server IP: 201.216.232.3
Probable Submitter: 24.232.219.76
----
Manual Page -- http://www.php.net/manual/en/language.variables.variable.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61476
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61476&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61476&report=yes
Search -- http://master.php.net/manage/user-notes.php