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 PHP Basics (Retired) PHP Conditionals & Loops Conditionals Challenge

Russell Comer
Russell Comer
26,102 Points

In Task 2 of PHP Conditionals & Loops code Challenge the directions are not clear as to what I'm supposed to do

In Task 2 of PHP Conditionals & Loops code Challenge the directions are not clear as to what I'm supposed to put in the if statement if the IF statement is true and no matter what I put in the block my answer is wrong. Anyone else having this issue?

6 Answers

<?php

$name = "Mike";

if($name == "Mike") {
  echo "Hi, I am Mike!";
}

?>

Hi Russell,

It's asking you to check whether $name == "Mike" using an if statement.

Jeff

Russell Comer
Russell Comer
26,102 Points

This is what I have

$name = "Mike" if($name == "Mike"){

} The problem is there is no direction on what to put for the statement after the condition

That's question three.

Russell Comer
Russell Comer
26,102 Points

But it wont let me move forward keeps telling I have something wrong

Russell Comer
Russell Comer
26,102 Points

I closed my browser and reopened it and it worked. Thanks for your help!