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
greatestValue=> try this its very easy
$a=array(10,20,52,105,56,89,96); $c=0; foreach($a as $b) { if($b>$c) $c=$b; } echo $c;