note 27245 rejected from language.variables by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Fri, 29 Nov 2002 02:15:50 +0000 |
| Subject: | note 27245 rejected from language.variables by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-40095@lists.php.net to get a copy of this message | ||
$x="blah blah-blah";
$$x="value";
echo "var==" . $$x;
echo "var==" . ${"blah blah-blah"};
Its output is:
var==value
var==value
-> This works good as long as you are not using arrays.
I'm just writing an xml-parsing class and there I wanted to
do something like:
$x = "XML_DATA[global][authtype]";
$$x = "none";
Now the result is:
print $XML_DATA[global][authtype];
returns nothing but:
print ${"XML_DATA[global][authtype]"};
returns none.
Someone knows a workaround to load the
result into a dynamic-array?