Home and Learn: PHP Programming Course


A Simple Associative Array in PHP

 

<?PHP

$seasons = array(1 => "Autumn", 2 => "Winter", 3 => "Spring", 4 => "Summer");

print $seasons[1] . " ";
print $seasons[2] . " ";
print $seasons[3] . " ";
print $seasons[4];

?>

<-- Back One Page | Move on to the Next Part -->

Back to the PHP Contents Page

 

Email us: enquiry at homeandlearn.co.uk