Basic Array
//assign values to the array
$camelPop[1] = "Somalia";
$camelPop[2] = "Sudan";
$camelPop[3] = "Mauritania";
$camelPop[4] = "Pakistan";
$camelPop[5] = "India";
//output array values
print "Top Camel Populations in the World
";
for ($i = 1; $i <= 5; $i++) {
print "$i: $camelPop[$i]
\n";
} //end loop
//user array function to load up an array
$binary = array("000", "001", "010", "011");
print "Binary numbers
";
for ($i = 0; $i < count($binary); $i++) {
print "$i: $binary[$i]
\n";
}
?>