Мне нужна помощь с сортировкой многомерного массива в php.Мне нужно, чтобы массив был сгруппирован по месяцам, а затем отсортирован по месяцам.Вот мой оригинальный массив:
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
)
)
И вот что я надеюсь получить:
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
)
)
)