【发布时间】:2016-08-15 13:00:59
【问题描述】:
显示通知的最终数组如下:
Array
(
[0] => Array
(
[notification] => 1 new topic posted in : Current Affairs classroom
[on_create] => 12th Aug - 2016 5:20AM
[notif_date_sort] => 2016-08-12 05:20:23
)
[1] => Array
(
[notification] => 8 new topic posted in : GK classroom
[on_create] => 4th Aug - 2016 10:51AM
[notif_date_sort] => 2016-08-04 10:51:56
)
)
我尝试了 multisort、ksort 等方法,但没有找到合适的结果。如何根据“notif_date_sort”对数组中的这些元素进行排序?
【问题讨论】:
标签: php arrays sorting multidimensional-array logic