I need to get all maximum values from array using php.
For this array:
$arr = array('a'=>10,'b'=>20,'c'=>5,'d'=>20);
I used below code,
$key = array_search(max($arr), $arr);
but I get only b
, I need to get both b
and d
-- all keys with the highest value.