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
For reference, I've put a set of stable sort variants of builtin PHP functions on Github: https://github.com/vanderlee/PHP-stable-sort-functions, based on @Barmar's solution and a few other tricks.