Created
December 20, 2013 06:53
-
-
Save itskingori/8051294 to your computer and use it in GitHub Desktop.
Creating Arrays
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Exercise 04: Creating Arrays</title> | |
</head> | |
<body> | |
<?php | |
// Create array that holds all the provinces of Kenya and output them to the | |
// browser from top to bottom | |
// Create the array | |
$province[1] = "Central"; | |
$province[2] = "Coast"; | |
$province[3] = "Eastern"; | |
$province[4] = "North Eastern"; | |
$province[5] = "Nairobi"; | |
$province[6] = "Nyanza"; | |
$province[7] = "Rift Valley"; | |
$province[8] = "Western"; | |
// Output the array | |
echo "<pre>"; | |
print_r($province); | |
echo "</pre>"; | |
?> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment