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, "
Associative Arrays In an associative array, the keys assigned to values can be arbitrary and user defined strings. In the following example the array uses keys instead of index numbers: Example Run this code» <?php// Define an associative array$ages=array("Peter"=>22,"Clark"=>32,"John...
PHP - While Loop PHP - Do…While Loop PHP - Break Statement PHP - Continue Statement PHP Arrays PHP - Arrays PHP - Indexed Array PHP - Associative Array PHP - Multidimensional Array PHP - Array Functions PHP - Constant Arrays PHP Functions PHP - Functions PHP - Function Parameters PHP - ...