- array_map: documentation ( source)
- print_r: documentation ( source)
- array_values: documentation ( source)
<?php
$scores = [
'user_a' => [75, 67, 80, 90, 20, 80],
'user_b' => [65, 70, 80, 90, 20, 80],
'user_c' => [56, 70, 75, 80, 50, 70],
'user_d' => [40, 50, 89, 56, 45, 78],
'user_e' => [60, 80, 90, 78, 80, 76],
];
$max = array_map(
'max',
array_map(null, ...array_values($scores))
);
print_r($max);