Created
May 23, 2015 15:53
-
-
Save cheapwebmonkey/fbcde8ec51cf4686010d to your computer and use it in GitHub Desktop.
Lists different ice cream flavors in php array
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
<?php | |
$flavors = array("Vanilla","chocolate", "Strawberry", "Spumoni"); | |
?><pre> | |
<?php | |
echo "We have " . count($flavors) . " flavors available. Here's a list:\n"; | |
foreach ($flavors as $flavor) { | |
echo $flavor . "\n"; | |
} | |
?> | |
</pre> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment