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 trialPhillip Gibson
1,731 PointsI need help with this question
I need help with question, according to everything we have covered so far this should be how the code for this question should be written right? Did I miss something? The question is asking me to change it so that the paragraph will state how many flavors of ice cream the shop has and according to my notes this is how it should be written but it keeps coming back wrong, please help.
<?php
$flavors = array("Chocolate","Vanilla","Chocolate Chip");
?>
<p>Welcome to Ye Olde Ice Cream Shoppe. We sell <?php echo . count($flavors) ?> flavors of ice cream.</p>
<ul>
<li><?php echo $flavor1; ?></li>
<li><?php echo $flavor2; ?></li>
</ul>
1 Answer
Kevin Korte
28,149 Pointsecho
and count
are built in functions of PHP, so you don't need to concatenate them. I think if you just simply remove the period between the two, it should give you the results you want.
Phillip Gibson
1,731 PointsPhillip Gibson
1,731 PointsThanks very much, that was indeed the problem. Thanks again for your help.
Kevin Korte
28,149 PointsKevin Korte
28,149 PointsYou're welcome