note 50529 added to language.variables.variable

From: Date: Wed, 02 Mar 2005 20:06:28 +0000
Subject: note 50529 added to language.variables.variable
Groups: php.notes 
Request: Send a blank email to php-notes+get-85819@lists.php.net to get a copy of this message
<?php # Multidimensional variable variables $foo = "this is foo."; $ref = "foo"; print $$ref; # prints "this is foo." $foo[1]['a_z'] = "this is foo[1][a_z]."; $ref = "foo[1][a_z]"; print $$ref; # Doesn't print anything! $foo = "this is foo."; $ref = "foo"; $erf = eval("return \$$ref;"); print $erf; # prints "this is foo." $foo[1]['a_z'] = "this is foo[1][a_z]."; $ref = "foo[1][a_z]"; $erf = eval("return \$$ref;"); print $erf; # prints "this is foo[1][a_z]." ?> ---- Manual Page -- http://www.php.net/manual/en/language.variables.variable.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+50529 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+50529&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+50529&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+50529&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+50529&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+50529&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+50529&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#85819) next »