if you just want to know the highest value, as I understand it
In this array I want to find the maximum number, and if the array contains the same maximum values as one maximum value randomly.
you could just do it
$array = [['3','1','2','2'],['1','2','3','3'],['2','1','1','3']];
$result = [];
foreach(new RecursiveIteratorIterator(new RecursiveArrayIterator($array)) as $value) {
$result[] = $value;
}
echo max($result);
this will allow you to select the entire array and click values on $result, then you will have only one array of levels and easily use the functionmax