PHP Multidimensional Array

PHP Multidimensional Array

Multidimensional Array, means an Array  inside an array

In this Sample code, there is an Array variable name robot
inside the robot array there is another array with index 0 refer to as “name ” while index 1 refer to as “serialNumber”.

Refer the Sample Code below.

 

<!DOCTYPE html>
<html>
<body>
 
<?php

$robot[0]= array("name"=>"aBot",  "serialNumber"=>"11111");
$robot[1]= array("name"=>"bBot",  "Experience"=>"22222");
        
   

echo $robot[1]["name"];
 


?>
 
</body>
</html>





Leave a Comment

six − 6 =