I have an array that is already sorted but i want to give a ranking to each row. If there are matching values then it will skip a rank like 1,2,2,4,5,5,5,8.
It could potentailly be sorted on any columns but in the example below it is sorted on a and b. The rank below would be 1,1,3 as arrays 0 and 1 match.
Example array
Array
(
[0] => Array
(
[rank] =>
[a] => 5
[b] => 4
[c] => 1
)
[1] => Array
(
[rank] =>
[a] => 5
[b] => 4
[c] => 9
)
[2] => Array
(
[rank] =>
[a] => 3
[b] => 25
[c] => 9
)
)
Where
$arris your array: