Try using krsort, it'll sort the array descending by the key rather than the value:
Code:
//Setup your array:
$imageScores[$score] = $imageType;
//etc
//Sort by key, max score is now the first item in the array
krsort($imageScores, SORT_NUMERIC);
//Get the first item in the array, there are hundreds of ways you could do this and this is just one:
$maxValue = reset($imageScores);
If you need the key (score) as well as the value (as I suspect you might), the reset() method will not work and you may have to do something like a foreach or extract the key values:
Code:
//Setup your array:
$imageScores[$score] = $imageType;
//etc
//Get the scores as an array
$scoresArray = array_keys($imageScores);
//Get the max value
$maxKey = max($scoresArray);
$maxValue = $imageScores[$maxKey];
There are probably hundreds of other ways of doing it too.