English

Explain the Multidimensional Array.

Advertisements

Question

Explain the Multidimensional Array.

Long Answer
Advertisements

Solution

  1. A multidimensional array is an array containing one or more arrays.
  2. PHP understands multidimensional arrays that are two, three, four, five, or more levels deep.
  3. 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
  Is there an error in this question or solution?
Chapter 5: PHP Function and Array - Evaluation - PART – IV [Page 104]

APPEARS IN

Samacheer Kalvi Computer Applications [English] Class 12 TN Board
Chapter 5 PHP Function and Array
Evaluation - PART – IV | Q 3. | Page 104
Advertisements
Share
Notifications



      Forgot password?
Use app×