I have the below array
Array
(
[0] => Array
(
[reservation_time] => 08:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-14
)
[1] => Array
(
[reservation_time] => 09:00
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-14
)
[2] => Array
(
[reservation_time] => 09:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-14
)
[3] => Array
(
[reservation_time] => 08:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-15
)
[4] => Array
(
[reservation_time] => 09:00
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-15
)
[5] => Array
(
[reservation_time] => 09:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-15
)
[6] => Array
(
[reservation_time] => 08:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-16
)
)
I like the array should be
Array(
[2011-07-14] => Array
(
[0] => Array
(
[reservation_time] => 08:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-14
)
[1] => Array
(
[reservation_time] => 09:00
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-14
)
)
[2011-07-15] => Array
(
[0] => Array
(
[reservation_time] => 08:30
[user_name] =>
[reason] =>
[comments] => recursive
[reservation_date] => 2011-07-15
)
)
How can i loop this array to get the desired output
Regards Nisanth