【发布时间】:2013-03-06 17:54:01
【问题描述】:
我有很多新闻,比如
Array
(
[0] => Array
(
[news_published] => 1337192831
[news_category] => 5
)
[1] => Array
(
[news_published] => 1334566743
[news_category] => 5
)
[2] => Array
(
[news_published] => 1340092425
[news_category] => 6
)
[3] => Array
(
[news_published] => 1339740173
[news_category] => 6
)
[4] => Array
(
[news_published] => 1336148837
[news_category] => 6
)
)
如何按降序对 news_published 进行排序....我已尝试使用 'usort' 但无法正确找到结果,谁能建议我?
【问题讨论】:
-
uksort: 试试第一个例子……
-
发布您的 usort() 尝试,usort 应该可以工作,因为它将使用元素的 VALUE 而不是键