• 6 years ago
In PHP, two-dimensional arrays are arrays that contain arrays/ array with in array. You can think of the outer array as containing the rows and the inner arrays as containing the data cells in those rows. For example, a two-dimensional array called $foods could contain the names of the HEALTHY and UNHEALTHY foods. Below is a grid that represents such a two-dimensional array.

Healthy Foods: Unhealthy Foods:
Salad Ice Cream
Vegetables Pizza
Pasta

Recommended