### Possible Answer

@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

2D Array - Count The Size Of Each Array Element Jul 23, 2003. What i want is something like for ($i=0;$i<$var;$i++) {create 2D array if (condition) - 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.