I have an array like:
Array
(
[0] => Array
(
[Name] => Name1
[Totaal] => 13
)
[1] => Array
(
[Name] => Name2
[Totaal] => 117
)
[2] => Array
(
[Name] => Name3
[Totaal] => 39
)
)
Now i would like to get the the array with the highest "Totaal" In this example, i would like to have returned:
Array
(
[Name] => Name2
[Totaal] => 117
)
I have found methods like:
max(array_column($arr, 'Totaal'));
But this only returns the max value, and not the array itself. Any ideas?