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
i cant complete this
i cant complete this some one help me
<?php $flavor="ick"; echo "<p>Your favorite flavor of ice cream is "; echo "vanilla"; echo ".</p>"; echo "<p>Randy's favorite flavor is cookie dough, also!</p>"; ?>
Niclas Valentiner8,947 Points
You need to add a spaces between your variable, the assignment operator (=) and the value, like so:
$flavor = "ick";
Ben Brenton266 Points
I recently did this so I can help in some regard, however I wouldn't like to answer it for you as that would ruin all the fun. The first task in the challenge is simply asking you to define the variable $flavor, and this might be where you are making the mistake (don't forget the flavor has already been mentioned on the page!) The second task requires you to amend line 4 so that instead of returning a string it is returning a variable. Again, this should be simple using what you have already learnt previously to this. The third task is more complicated as it is asking for new code to be written for a conditional statement. Aside from answering it for you, I can confirm that the lesson previous to this challenge gives you all the information needed for this task. And the fourth task is simply changing some wording on the second line.
Hope this helps!