Hi,
I'm new to this board, and new to multi dimensional arrays.
What I'm trying to do is get the minimum value of an array element from the example below.
Array ( [player1] => Array ( [0] => 3 [1] => 5 [2] => 4 [3] => 4 [4] => 4 [5] => 5 [6] => 4 [7] => 3 [8] => 4 [9] => 5 [10] => 3 [11] => 5 [12] => 3 [13] => 4 [14] => 4 [15] => 5 [16] => 3 [17] => 4 )
[player2] => Array ( [0] => 4 [1] => 4 [2] => 5 [3] => 4 [4] => 3 [5] => 4 [6] => 5 [7] => 5 [8] => 3 [9] => 5 [10] => 4 [11] => 4 [12] => 3 [13] => 4 [14] => 3 [15] => 4 [16] => 3 [17] => 4 )
[player3] => Array ( [0] => 5 [1] => 3 [2] => 7 [3] => 4 [4] => 3 [5] => 4 [6] => 4 [7] => 4 [8] => 4 [9] => 4 [10] => 3 [11] => 3 [12] => 4 [13] => 4 [14] => 4 [15] => 3 [16] => 4 [17] => 3 )
[player4] => Array ( [0] => 2 [1] => 3 [2] => 5 [3] => 4 [4] => 5 [5] => 5 [6] => 5 [7] => 4 [8] => 3 [9] => 4 [10] => 4 [11] => 4 [12] => 4 [13] => 4 [14] => 3 [15] => 4 [16] => 3 [17] => 3 )
)
I have 4 dimensions, each with 18 elements. I want to know what is the lowest value of each dimension. So in the above example for the first element, the values are 3, 4, 5, 2 - I want to return 2 as the lowest. The next element I have 5, 4, 3, 3 - so I want 3 to return as the lowest.
Ideally I would like a function to do this, and pass the element in but not sure how to do this. I've read you can get min and max values of a single array, but havent found any documention I can use to do the same for multi dimensional arrays.
Any help or suggestions would be most appreciated.