Greg Donald wrote:
On Tue, 11 Jan 2005 16:10:00 -0500 (EST), Bruce Cooper
<coop.ie@xxxxxxxxxx> wrote:
I'm trying to set up a custom sort for multi-level [i.e. nested] arrays. The problem is I can't seem to get PHP to recognize syntax such as follows
$test=$test_array.'[index][next]';
Perhaps this will work for you.
<?php
$index1 = 'index';
$index2 = 'next';
$test_array[$index1][$index2] = 'some value';
var_dump($test_array[$index1][$index2]);
?>
--
Teach a person to fish...
Ask smart questions: http://www.catb.org/~esr/faqs/smart-questions.html
PHP Manual: http://www.php.net/manual/en/index.php
php-general archives: http://marc.theaimsgroup.com/?l=php-general&w=2
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php