Re: Array Simplification

From: Date: Tue, 22 Jul 2003 23:17:48 +0000
Subject: Re: Array Simplification
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156357@lists.php.net to get a copy of this message
* Thus wrote jwulff (johnw@orcasnet.com): > I've got a nested array below that I'm having some trouble simplyfing. > Here is an example of how the array is now: > > [...] > > Array > ( > [0] => Array > ( > [0] => 2003-06-10 17:00:00 > [1] => 9054.89 > [2] => 153.84 > ) > ) > something like this would be easier to understand and more structured: $var = array( '2003-06-10 17:00:00' => array( '9054.89', '153.84' ) ); print_r($var): Array ( [2003-06-10 17:00:00] => Array ( [0] => 9054.89 [1] => 153.84 ) ) HTH, Curt -- "I used to think I was indecisive, but now I'm not so sure."

« previous php.general (#156357) next »