PHP Associative array


Associative array will have their index as string so that you can establish a strong association between key and values. The associative arrays have names keys that is assigned to them.
There are two ways to define Associative array:
1st way:
$age=array(“raj”=>”45”,”rajesh”=>”54”);
2nd way:
$age[“raj”]=“45”;
$age[“rajesh”]=“54”;
 <html>
 <body>
 <?php
 $age=array(“raj”=>”45”,”rajesh”=>”54”);
 echo ”Age of: ".$age[“raj"]."<br/>";
 echo ”Age of: ".$age[“rajesh"]."<br/>";
 ?>
 </body>
 </html>