I need some help with sorting a multidimensional array in php. I need the array to be grouped into months, and then sorted by month. Here's my original array:
Array
(
[0] => Array
(
[IdEvent] => 5
[EventName] => Copy of Opening snow weekend
[Year] => 2011
[Month] => 08
)
[1] => Array
(
[IdEvent] => 7
[EventName] => Copy of Copy of Opening snow weekend
[Year] => 2011
[Month] => 07
)
[2] => Array
(
[IdEvent] => 1
[EventName] => Opening snow weekend
[Year] => 2011
[Month] => 05
)
[3] => Array
(
[IdEvent] => 6
[EventName] => Copy of Opening snow weekend
[Year] => 2011
[Month] => 05
)
)
And here's what I'm hoping to get:
Array
(
[0] => Array (
[0] => Array
(
[IdEvent] => 1
[EventName] => Opening snow weekend
[Year] => 2011
[Month] => 05
)
[1] => Array
(
[IdEvent] => 6
[EventName] => Copy of Opening snow weekend
[Year] => 2011
[Month] => 05
)
)
[1] => Array (
[0] => Array
(
[IdEvent] => 7
[EventName] => Copy of Copy of Opening snow weekend
[Year] => 2011
[Month] => 07
)
)
[2] => Array (
[0] => Array
(
[IdEvent] => 5
[EventName] => Copy of Opening snow weekend
[Year] => 2011
[Month] => 08
)
)
)