Associative arrays are used to store key value pairs. For example, to store the age of different members of a family in an array, a numerically indexed array would not be the best choice. Instead, we could use the respective member’s names as the keys in our associative array, and the value would be their respective age.
There are two ways to create an associative array:
$age = array(“Anil”=>”45”, “Suita”=>”39”, “Ravina”=>”23”);