i need to sort an array in php based on value, array use some numbers for keys and values, for example like this:
$a = array(70 => 1 ,82
This is because the sort family of functions are not stable. If you need the sort to be stable then you either have to implement it yourself, or iterate over the sorted result and "correct" the positions of the elements using array_splice.
sort