我想按 的值对数组从高到低进行排序amount
。我的数组$res
如下:
Array
(
[0] => 1
[id] => 1
[1] => Testowy 1
[user] => Testowy 1
[2] => 150
[amount] => 150
[3] => 1,2,3
[what] => 1,2,3
[4] => Polska
[country] => Polska
[5] => 1
[platform] => 1
)
Array
(
[0] => 2
[id] => 2
[1] => Testowy 2
[user] => Testowy 2
[2] => 100
[amount] => 100
[3] => 1
[what] => 1
[4] => United States
[country] => United States
[5] => 2
[platform] => 2
)
我尝试使用max
and arsort
,但似乎没有一个接受他们应该使用哪个键进行排序。有什么帮助吗?