Lowest price ever! Learn Generative AI for 48% less!
Get my discount0
In associative array, the keys bear some relation to the value other than representing it's position in the array.
They are suitable when use of numerical indexed arrays.
eg.
<?php
$a=array('name'=>'vinay','email'=>'[email protected]');
echo $a['name']."<br>";
echo $a['email']."<br>";
?>
o/p :-
vinay
[email protected]