how to create multi dimensional array in php

how to create multi dimensional array in php


MultiDimensionalArray.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>how to create multi dimensional array in php</title>
</head>

<body>
    <h2 style="color:Seagreen; font-style:italic">php function example: using multi dimensional array</h2>
    <hr width="550" align="left" color="Green" />
    <br />
 </div>
    <?php
  $Employees = array(
         "Employee1"=> array("FirstName"=>"Ben", "LastName"=>"forta"),
         "Employee2"=> array("FirstName"=>"Raymond", "LastName"=>"Roy")       
         );
  echo '<div style="font-size:large; color:Crimson;">';
   echo "Employee1 First Name: ";
   echo $Employees["Employee1"]["FirstName"];
   echo "<br />Employee2 First Name: ";
   echo $Employees["Employee2"]["FirstName"];
  echo "</div>";
 ?>
</body>
</html>