In PHP, max() returns the highest value in an array or the greatest value among inputs. If we have two or more equally greatest values, how to deal with that situation?
eg
$arr = array("a"=>1,"b"=>10, "c"=>10);
now, what should max($arr), return. Ideally it returns the first encountered highest value, b. What if I want both b and c as result?
If you have the highest value in that array (that is, what max() returns), you can just search for all occurrences of that value in the array: