note 3444 deleted from language.variables.variable by irc-html

From: Date: Sat, 19 Jan 2002 18:53:59 +0000
Subject: note 3444 deleted from language.variables.variable by irc-html
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-25201@lists.php.net to get a copy of this message
When using variable variables that are arrays, and you wish to print the value, you have to use a temporary variable. For example: print("${$a}[$index]"); will not work, use $temp=${$a}[$index]"); print("$temp"); instead. [Editors note: See the variable parsing section in types/strings. You can use print "{${$a}[$index]}"; in this case

« previous php.notes (#25201) next »