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
PHP use quicksort as base sorting-algorithms. You hae two options:
I have programmed a package porth/avalanchesort (https://github.com/porthd/avalanchesort) on github, which contains a recursive naturell-merge-sort. You can use your own comparsionfunction and your own data-structure. The package contains an example for associative arrays and for list-arrays.