Chapter

Multidimensional Arrays

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How does PHP support and create multidimensional arrays?

    "PHP supports multidimensional arrays in the sense that elements in an array can be of any type, including other arrays. We can use the same syntax and operations for single dimensional arrays. For ex

  2. How can two indices be used to set values in a two-dimensional PHP array?

    "Alternatively, you can use two indices to get and set values from a 2-dimensional array.\n\nfor($i=0; $i<3; $i++) {\n\nfor($j=0; $j<4; $j++) {\n\n$mat[$i][$j] = ($i+$j)*3;\n\n}\n\n}\n\nwhich results

Multidimensional Arrays | ComputerScienceOne | Bifalgorithm | Bifalgorithm