Associative arrays are used to store key and value pairs. For example, to save the marks of the unique subjects of a scholar in an array, a numerically listed array would no longer be a nice choice.

BY Best Interview Question ON 18 Aug 2020

Example

/* Method 1 */
$student = array("key1"=>95, "key2"=>90, "key3"=>93);

/* Method 2 */
$student["key1"] = 95;
$student["key2"] = 90;
$student["key3"] = 93