note 15553 added to language.variables.variable

From: Date: Mon, 17 Sep 2001 15:25:17 +0000
Subject: note 15553 added to language.variables.variable
Groups: php.notes 
Request: Send a blank email to php-notes+get-18081@lists.php.net to get a copy of this message
What's with this? $dynvar = "GLOBALS[cfg][DBName]"; echo $$dynvar; there's no error but nothing happens! $dynvar = "GLOBALS"; $dynkey1 = "cfg"; $dynkey2 = "DBName"; echo ${$dynvar}[$dynkey1][$dynkey2]; works well but if you want to build dynamic variables in realworld you can only use eval() but slower . I think it's not clear why working with arrays stored in variables is so different to singlevariables stored in variables! Is This a BUG???? http://www.php.net/manual/en/language.variables.variable.php

« previous php.notes (#18081) next »