Re: [PHP] Reformat array result.

2010-09-08 Thread chris h
Paul, How are you matching the records in the "event count" array to the ones in the timestamp array? Is it safe to say that: "$timestamp[ $i ]" corresponds to "$eventCount[ $i ]"? If so, you could just iterate through the timestamp array; on each iteration create a record in a new array that ho

[PHP] Reformat array result.

2010-09-08 Thread Paul Halliday
I have been starting at this problem blankly for a couple hours now. Hopefully someone can help. I have a query that returns an event count grouped by hour: timestamp: Array ( [0] => 2010-09-08 03 [1] => 2010-09-08 04 [2] => 2010-09-08 05 [3] => 2010-09-08 06 [4] => 2010-09-08 07 [5] => 2010-09-0