我有一個需要排序的多維數組。我希望這個數組首先根據從高到低的數量進行排序。但是,如果count具有相同的值,則按字母順序按城市排序。我不知道該怎麼做。對多維數組排序兩次
多維數組:
Array
(
[0] => Array
(
[id] => 2
[city] => c
[count] => 5
)
[1] => Array
(
[id] => 3
[city] => b
[count] => 10
)
[2] => Array
(
[id] => 4
[city] => a
[count] => 5
)
)
任何想法?
編輯:
這是結果,我想:
Array
(
[0] => Array
(
[id] => 3
[city] => b
[count] => 10
)
[1] => Array
(
[id] => 4
[city] => a
[count] => 5
)
[2] => Array
(
[id] => 2
[city] => c
[count] => 5
)
)
可能重複二維數組的值](http://stackoverflow.com/questions/2699086/sort-multi-dimensional-array-by-value) –