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 trial
Andy Crofford
9,959 PointsCode Challenge Variables and Conditionals 4/4
I cannot figure out why this will not work. I have searched the forum and my code is the same as what it is saying works.
<?php
$flavor = "cookie dough";
echo "<p>Your favorite flavor of ice cream is ";
echo $flavor;
echo ".</p>";
if ($flavor == "cookie dough") { echo "Randy's favorite flavor is cookie dough, also!"; }
?>
Here is a screenshot, it is working as it should but I keep getting the error message in the image
1 Answer
Michael O'Malley
4,293 PointsYour syntax is correct, you're just missing the paragraph tags.
echo "<p>Randy's favorite flavor is cookie dough, also!</p>";
Andy Crofford
9,959 PointsAndy Crofford
9,959 PointsAfter working on this for an hour and a half the other night and creating this post out of frustration I went back and redid the challenge for the umpteenth time and it worked. I appreciate your help.
Andy