note 27245 added to language.variables

From: Date: Thu, 28 Nov 2002 20:23:18 +0000
Subject: note 27245 added to language.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-40082@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? -- http://www.php.net/manual/en/language.variables.php http://master.php.net/manage/user-notes.php?action=edit+27245 http://master.php.net/manage/user-notes.php?action=delete+27245 http://master.php.net/manage/user-notes.php?action=reject+27245

« previous php.notes (#40082) next »