The best PHP multidimensional array Tutorial In 2024, In this tutorial you can learn Examples,PHP - Multidimensional Arrays,Examples,
An array of value can be another array, another array value can also be an array. In this manner, we can create a two-dimensional or three-dimensional array:
Multidimensional array containing one or more arrays of arrays.
In a multidimensional array, main array, each element can also be an array of sub-arrays of each element can also be an array.
In this example, we create an automatically assigned ID keys multidimensional array:
The above array output as follows:
Let us try to show a value in the array above:
echo $sites['w3big'][0] . '地址为:' . $sites['w3big'][1];
The code above will output: