note 8657 added to Variable variables

From: Date: Fri, 22 Sep 2000 11:15:04 +0000
Subject: note 8657 added to Variable variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-5326@lists.php.net to get a copy of this message
This is one thing that I have noticed that dosn't work quite the way it should: $x[5] = 'foo'; $y = 'x[5]'; $$y = 'bar'; printf("%s %s\n",$x[5],$$y); The output will be 'foo bar' when it should be 'bar bar'. Is there a way to fix/get around this? Or am I wishing for the impossible? http://www.php.net/manual/language.variables.variable.php

« previous php.notes (#5326) next »