xxxxxxxxxx
<?php
$myarrayassoc = array("Cycles" => 3, "Bikes" => 6, "Cars" => 11);
$value = max($myarrayassoc);
$key = array_search($value, $myarrayassoc);
echo "The max value is: ".$value.", its key is: ".$key;
?>
xxxxxxxxxx
Input : max(12, 4, 62, 97, 26)
Output : 97
Input : max(array(28, 36, 87, 12))
Output : 87