[PHP] Array Simplification

2003-07-22 Thread jwulff
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
)

[1] = Array
(
[0] = 2003-06-10 17:00:00
[1] = 153.84
)
)

As you can see the dates are redundant, I'd really like nested array's with
the same date combined as follows.

Array
(
[0] = Array
(
[0] = 2003-06-10 17:00:00
[1] = 9054.89
[2] = 153.84
)
)


Thanks!



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



RE: [PHP] Array Simplification

2003-07-22 Thread Chris W. Parker
jwulff mailto:[EMAIL PROTECTED]
on Tuesday, July 22, 2003 3:58 PM said:

 I've got a nested array below that I'm having some trouble simplyfing.
 Here is an example of how the array is now:

[snip]

How are you creating the array in the first place?



c.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] Array Simplification

2003-07-22 Thread Curt Zirzow
* Thus wrote jwulff ([EMAIL PROTECTED]):
 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.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php