Advertisements
Advertisements
Question
Explain the Multidimensional Array.
Long Answer
Solution
- A multidimensional array is an array containing one or more arrays.
- PHP understands multidimensional arrays that are two, three, four, five, or more levels deep.
- However, arrays more than three levels deep are hard to manage for most people.
Example:
<?php
// A two-dimensional array Sstudent-array
(
array(“Iniyan”, 100,96),
array(“Kavin”,60,59),
array(“Nilani”,1313,139)
);
echo $$student[0][0].“: Tamil Mark: “.$student [0][1]English mark: “.$student [0] [2].”<br>”;
echo $$student[1][0].“: Tamil Mark: “.$student [1][1].”. English mark: “.$student [1] [2].”<br>”;
echo $$student[2][0].“: Tamil Mark: “.$student [2][1]English mark: “.$student [2] [2].”<br>”;
?>
shaalaa.com
Array in PHP
Is there an error in this question or solution?
APPEARS IN
RELATED QUESTIONS
PHP’s indexed array begin with position ______.
Associative arrays are a ____ pair data structure.
$ stud = array (“Roll” ⇒ “12501”,“Name” ⇒ “Hari”);
Identify the type of array.
Arrays more than ____ levels deep are hard to manage.
Define Array in PHP.
List out the types of the array in PHP.
Define associative array.
What are indexed arrays?
Explain Array concepts and their types.
Explain Indexed array and Associate array in PHP.