Which of the following are true about multidimensional arrays in PHP?

  • Multidimensional arrays can only contain indexed arrays.
  • Multidimensional arrays allow for hierarchical data representation.
  • Multidimensional arrays can have unlimited dimensions.
  • Multidimensional arrays cannot be accessed using multiple indices.
The correct option is 2. Multidimensional arrays in PHP allow for hierarchical data representation, where arrays can be nested within one another to create a structured data organization. This nesting allows for the representation of complex data relationships and structures. While indexed arrays are commonly used in multidimensional arrays, associative arrays can also be used. Furthermore, there is no limit on the number of dimensions a multidimensional array can have, providing flexibility in creating data structures with any desired number of dimensions. Learn more: https://www.php.net/manual/en/language.types.array.php#language.types.array.syntax
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *