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

PHP Build a Simple PHP Application Creating the Menu and Footer Variables and Conditionals

i cant complete this

i cant complete this some one help me

echo "<p>Your favorite flavor of ice cream is ";
echo "vanilla";
echo ".</p>";
echo "<p>Randy's favorite flavor is cookie dough, also!</p>";


Asking for help is definitely encouraged when needed, but it would be more beneficial to other forum members if they understood the problem you are facing. It would be more helpful if you described the problem in addition to the code that you have posted, looking at this I don't know what aspect of it you are struggling with.

2 Answers

Niclas Valentiner
Niclas Valentiner
8,947 Points

You need to add a spaces between your variable, the assignment operator (=) and the value, like so:

$flavor = "ick";
Ben Brenton
Ben Brenton
266 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!