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

Stage 5 PHP Conditionals & Loops: Code Challenge is Broken

I'm can't figure out what I'm doing wrong in this challenge. I created a variable called $name and set it to 'Mike', that worked just fine. But running into an issue writing an if statement that checks whether $name is set to 'Mike'. Am I misunderstanding the question?

Also tried using the == and === operators, as well as setting a return inside the if statement, and a few other things. Nothing seems to be working.

Any suggestions?

<?php

$name = 'Mike';

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

}

?>

Also, the error message I keep getting is "Bummer! I cannot see your 'if' statement."

1 Answer

Logan R
Logan R
22,989 Points

I tried it and I also got the same error. I searched the challenge and it appears others are also having difficulty too.

Edit: Note: I tried " instead of ' too and it still didn't work for me.

https://teamtreehouse.com/forum/php-basics-ifelse-statements-challenge-task-2-of-3-cant-pass-seems-that-the-code-checking-script-is-broken

Logan R
Logan R
22,989 Points

Maybe Hampton Paulk will know the answer :)

Thanks! You're right, looks like something must be wrong with the last couple challenges and several people are running into the issue now.