I\'m trying to get hold of the largest value in an array, while still preserving the item labels. I know I can do this by running sort(), but if I do so I simply lose the la
asort() is the way to go:
$array = array("a"=>1,"b"=>2,"c"=>4,"d"=>5); asort($array); $highestValue = end($array); $keyForHighestValue = key($array);