Associative arrays are arrays that use named keys that are assigned by the user. An associative array can be created by: main.php Output 123456 <?php // Define an associative array $ages = array("Mark" => 22, "
Types of Arrays in PHP There are three types of arrays that you can create. These are: Indexed array— An array with a numeric key. Associative array— An array where each key has its own specific value. Multidimensional array— An array containing one or more arrays within itself. ...