Sorting the array and using array_pop() is silly, we discussed that before...
Actually, you have this associative array, some elements of which have the same key?
Then from among these, you want to find the highest value?
Perhaps 1 simple way would be to sequentially place all elements that have that particular key into another array, then use max() on that new array.
Conversely, you could use:
$searchkey = 'somekey';
$maxval = $array[$searchkey];
foreach ($array as $key => $val) {
if ($key == $searchkey) {
if ($val > $maxval) {
$maxval = $val;
}
}
}
then $maxval will contain the value required