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!
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
MUZ140886 Mandava4,675 Points
just failing to pass 4 0f despite doing all the suggested codes
where do i really write $flavor="cookie dough"? i wrote this inside the php code and burmer and try again message keep on coming, i wrote like this $flavor = "cookie dough" echo If(flavor == "cookie dough") also tried removed the previous $flavor variable and placed cookie dough and nothing passed, can someone show me the entire code from challenge 1
<?php $flavor = "vanilla"; echo "<p>Your favorite flavor of ice cream is "; echo "vanilla"; echo ".</p>";If($flavor == "cookie dough") echo "<p>Randy's favorite flavor is cookie dough, also!</p>"; ?> <?php $flavor="cookie dough";
Paul Johnson18,924 Points
What the task is asking you to do is change the $flavor variable to "cookie dough", so all you have to do is change the first flavor variable to "cookie dough".
Also your second echo command is incorrect, it should be echo $flavor so it displays the value of your flavor variable.
Remember this task is all about variables and conditionals, it is important that you understand why your code is not working before moving on, if you don't understand it you will struggle later on, so it may be worth watching the video again.
So delete this
<?php $flavor="cookie dough";
and change your $flavor variable to cookie dough.
Also change this