I have these three sub arrays, I would like to make one array that
searches through each array for the highest value, and puts its key
into another array, to create a new array of key/key values
Edit
I’m looking through all 0’s, then all 1’s, then all 2’s to find the highest value there. I want to always start with whatever the all time highest number is though, and move on to the smallest as the keys become unavailabl
Input would be this
Array
(
Array
(
[0] => 16
[1] => 27
[2] => 36 // highest, 2 is now unavailable
)
Array
(
[0] => 27
[1] => 13.5 // highest, 1 is now unavailable
[2] => 9
)
Array
(
[0] => 81 // highest, 0 is now unavailable
[1] => 18
[2] => 27
)
)
Output would be this
Array
(
[0] => [2]
[1] => [1]
[2] => [0]
)
Something along these lines should do it, if I’m getting you right: