note 2152 deleted from Variable variables by jmcastagnetto

From: Date: Fri, 06 Oct 2000 10:42:16 +0000
Subject: note 2152 deleted from Variable variables by jmcastagnetto
Groups: php.notes 
Request: Send a blank email to php-notes+get-6151@lists.php.net to get a copy of this message
The ${x_$n} "trick" doesn't work for me on PHP 3.0.9 (RedHat RPMs). Neither did ${x_${n}}. <br> I kept getting errors like Parse error: parse error, expecting '['' or PHP_CLASS_OPERATOR' or `'}'' in filename on line xxxx. <br> I worked around it using a temporary variable. ie. $tmpvar = "x_$n"; and then I used ${$tmpvar}. It works, buit it's not as convenient. Is this fixed in newer versions perhaps? /ndy

« previous php.notes (#6151) next »