Array - partical path to the array's path....

From: Date: Tue, 27 Sep 2005 17:22:35 +0000
Subject: Array - partical path to the array's path....
Groups: php.general 
Request: Send a blank email to php-general+get-223294@lists.php.net to get a copy of this message
Here is something simple that I want it to work.. Not sure how to do this exactly... Code #1 [code] $array = array(); $array['col1']['col2'] = "Test #1"; $array['col3']['col2'] = "Test #2"; echo $array['col3']['col2']; //Spitted out result as "Test #2"... [/code] What I want this to work instead is [code] $array = array(); $array['col1']['col2'] = "Test #1"; $array['col3']['col2'] = "Test #2"; $prefix = "['col3']['col2']"; echo $array.$prefix; //Spitted out result as "Test #2"... [/code] This is the simple code that I'm trying to make it work. Does anyone know how does these work with array? Some help here... Thanks... FletchSOD

« previous php.general (#223294) next »