我的新聞像如何排序基於特定值
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(HTTP: //www.php.net/manual/en/function.uksort.php):嘗試第一個例子... – 2013-03-18 11:50:14
發佈你的usort()嘗試,usort應該工作,因爲它會使用元素的價值不是關鍵 – Waygood 2013-03-18 11:53:14
http://stackoverflow.com/questions/2699086/sort-multidimensional-array-by-value-2 – 2013-03-18 11:53:36