I have a multidimensional $array
that has a lot of various values. I am trying to get the maximum value in a given range in this case lets say the maximum value within x1,y0 and x2,y7, thus the result would be 6
using the data below.
It seems like a common problem for searching within coordinates in multidimensional array... but I cant find a simple solution and everything that I try to do seems to be rather extensive in the coding. I was wondering if there is a function that would allow me to search in this array using my criteria in an efficient way.
$array[0][0] = 1;
$array[0][1] = 10;
$array[0][3] = 3;
$array[1[0] = 1;
$array[1][1] = 1;
$array[2][5] = 6;