I want to sort an array highest to lowest by the value of amount. My array $res is as follows:
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
)
I tried using max and arsort, but none of those seem to accept which key they should use for sorting. Any help?
 
     
     
    