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

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

Lean Karlo Corpuz
Lean Karlo Corpuz
6,159 Points

Challenge instruction is not clear

not sure of what to do with the challenge

4 Answers

Lean Karlo Corpuz
Lean Karlo Corpuz
6,159 Points

Yes I've done that. But on the last challenge it say to set it to "cookie dough" and make sure to display the last echo but it send me back to challenge number 2 or 3.

Logan R
Logan R
22,989 Points

OK, so in number 3, you are simply adding an if/then statement around the line:

echo "<p>Randy's favorite flavor is cookie dough, also!</p>";
if($flavor == "cookie dough"){
echo "<p>Randy's favorite flavor is cookie dough, also!</p>";
}

In challenge three, it then wants you to change $flavor from your favorite flavor to cookie dough.

$flavor = "cookie dough";

If that doesn't work, just paste your code into the forum and I or someone else can take a peak to see if you made a small mistake :)

(Make sure you see the video on the right navbar if you haven't yet so you can properly paste in code without it looking sloppy)

:) Hope this helps!

Logan R
Logan R
22,989 Points
  • "In challenge three, it then wants you to change $flavor from your favorite flavor to cookie dough."

Should say in challenge 4, sorry xD

(Can't edit my comment :P)

Logan R
Logan R
22,989 Points

It's asking you to create a variable called $flavor, and set it equal to your favorite type of ice cream!

An example would be:

<?PHP
$flavor = "Mint Chocolate chip":
?>

Hope this helps! :D

Edit: Part 2 wants you to replace the echo "vanilla"; with a line of code that will echo the $flavor variable.

Lean Karlo Corpuz
Lean Karlo Corpuz
6,159 Points

yes I changed it but it redirects me back to challenge number 2.

Lean Karlo Corpuz
Lean Karlo Corpuz
6,159 Points

hmm weird thing did the same and its good.