Does anyone know how to sort an associative array into alternating largest smallest values?
I.E.
array("A"=>10, "B"=>2, "C"=>5, "D"=>1, "E"=>30, "F"=>1, "G"=>7)
Should become:
array("E"=>30, "D"=>1, "A"=>10, "F"=>1, "G"=>7, "B"=>2, "C"=>5)
Thanks
Based on the answer to your previous version of this question:
or, if you want largest first: