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
CRYSTAL MORRIS
Courses Plus Student 2,809 PointsWhat Is This Question Asking???
Challenge task 4 of 4 Change the value in the flavor variable to cookie dough. Preview the code and make sure the message appears.
(I Have Answered This Cookie Dough Question Every Way That I Could Imagine, Here re My Answers Foe Questions 1 thru 3 )
<?php
if ($flavor = "vanilla")
echo "<p>Your favorite flavor of ice cream is ";
echo "vanilla";
echo ".</p>";
if ($flavor == "vanilla"){ echo "on"; } "<p>Randy's favorite flavor is cookie dough, also!</p>";
".</p>";
?>
1 Answer
Robert Walker
17,146 PointsHi Crystal,
What you are missing is that you must change the "Value" in the "Variable".
<?php
$variable = "change this to cookie dough";
?>
So the value above is: "change this to cookie dough"
<?php
if ($flavor = "cookie dough")
echo "<p>Your favorite flavor of ice cream is ";
echo "cookie dough";
echo ".</p>";
if ($flavor == "cookie dough"){ echo "on"; } "<p>Randy's favorite flavor is cookie dough, also!</p>";
".</p>";
?>