If one-dimensional arrays are extended, PHP Multidimensional Array is obtained which consists of rows and columns and looks like a matrix. The memory location address also adds to the previous element address. They are also referred to as “array of arrays“.
An Array which contains one or more arrays in it called as Multidimensional Array.
There are 2-D, 3-D, 4-D or N-dimensional arrays. However, it is hard to manage arrays that are more than three levels.
Syntax
$array_name[d1][d2][d3]....[dn];
where d1=first dimension
d2=second dimension
.
.
dn=last dimension
Eg:
$a[2][3] : The example denotes that there are 2 rows and 3 columns.A total of 2x3=6 elements of variable.
$b[3][3][3] : The example denotes that there are 3 tables,3 rows and 3 columns. A total of 3x3x3=27 elements of b.