### Possible Answer

Hi, I know how to use the PHP sizeof function to find out the size of a one-dimensional array, such as sizeof($array), but this only gives me the size of the first dimension of a multidimensional array. - read more

@phihag gives a very elegant solution... there are no truly 2-dimensional arrays in PHP, the 'array of the array' can be any length, ... When we start to talk about 2D array's dimensions, I'd propose sticking with the mathematical equivalent of a matrix, ... - read more

Please vote if the answer you were given helped you or not, thats the best way to improve our algorithm. You can also submit an answer or search documents about sizeof 2d array php.