note 51012 deleted from language.variables.variable by nlopess
| From: | nlopess@php.net | Date: | Wed, 16 Mar 2005 15:18:30 +0000 |
| Subject: | note 51012 deleted from language.variables.variable by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-86559@lists.php.net to get a copy of this message | ||
Note Submitter: Oderik
----
As already mentioned by John, there seems to be a problem when using array braces inside the
variable name.
$var_name_a = 'my_array[1]';
$var_name_b = 'my_array[2]';
$$var_name_a = 'foo';
$$var_name_b = 'bar';
var_dump($my_array);
// Output: NULL
Any suggestions for a work-around? I would like to generate a tree structure using variable
variables.