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

Make a simple PHP Application - Stage 2 - Code Challenge Problem

When I complete question 3 of the code challenge, I have to change my favorite flavor of ice cream to something other than randy's flavor. Then in question 4 I need to change it back to the same value, but it says

**Oops!** It looks like Task 3 is no longer passing!

index.php
<?php

echo "<p>Your favorite flavor of ice cream is ";
$flavor = 'cookie dough'; 
$randysFlavor = 'cookie dough';
echo $flavor;
echo ".</p>";
echo "<p>Randy's favorite flavor is ";
echo $randysFlavor; 
if ($flavor == $randysFlavor) 
{ 
  echo ", too!"; 
} 
else 
{ 
  echo "."; 
}
echo "</p>";
?>

1 Answer

i suggest you start from the beginning.. dont change anything unless they specifically tell you too. You have changed so many things, it's no wonder why..

if re-doing it from task1 doesnt help, post back and i will post some hints

I did it again and did exactly what they said to do and it didn't work - but on my third try it worked. Not really sure why though.