i have this situation:
print_r($key);echo'<br>';
foreach($value as $test){
print_r(count($test));echo'<br>';
}
echo'<br>';
witch returns:
Jerome Frier
2
5
1
Luke Saora
5
4
6
Tracy Edion
6
1
4
what i am aiming for is to display the maximum value for each name, like this:
Jerome Frier Luke Saora Tracy Edion
6 5 6
basically taking the maximum value for each name comparing each row..
does this sound confuse… 🙂
thanks
If I were you I’d just make use of PHP’s max function. If the first and only parameter is an array, max() returns the highest value in that array. If at least two parameters are provided, max() returns the biggest of these values.
So either you put all the values in an array and throw it into the
max()function, or you insert them one by one..