Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAndrew Lyon
3,901 Pointsphp code challenge problem
I've checked my code against what I've got from the lesson, including my own files, and I can't find out what is wrong with it!
<?php
$flavors = array("Chocolate","Vanilla","Strawberry");
?>
<p>Welcome to Ye Olde Ice Cream Shoppe. We sell <?php echo count($flavors); ?> flavors of ice cream.</p>
<ul>
<?php foreach($flavors as $flavor); { ?>
<li><?php echo $flavor; ?></li>
<?php } ?>
</ul>
2 Answers
Muhammad Mohsen
Courses Plus Student 10,843 Points<?php foreach($flavors as $flavor); { ?>
Remove the semicolon after the foreach closing brantasy
Andrew Lyon
3,901 PointsThanks Muhammad - such a small detail but makes all the difference!
Muhammad Mohsen
Courses Plus Student 10,843 PointsYour welcome, And yes it is xD.