In the previous tutorial, we have learned that an array is a simple list of numbers/values.
Sometimes we want to use more than one key to save data, so we need to use PHP's multi-dimensional array to achieve it.
Basic knowledge
##PHP multidimensional array refers to a More than one arrayPHP can understand it as a multi-dimensional array of two, three, four or five levels or even more levels. However, most people have trouble managing arrays that are more than three levels deep
Note: The dimension of the array indicates the index number of elements that need to be selected
php two-dimensional array
A two-dimensional array is an array of arrays. Similarly, a three-dimensional array is an array of arrays.
Note: A two-dimensional array requires two indexes to select elements
Example
Suppose there is a score sheet
Name
## Language
Mathematics
English
## Xiao Ming
90
80
77
Xiaolong
88
75
89
## 小花
9
95
94
We can save the array in the above table in a two-dimensional array,
The courseware is not available for download at the moment. The staff is currently organizing it. Please pay more attention to this course in the future~
Students who have watched this course are also learning