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 trialCaleb Sylvest
7,642 PointsStage 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
22,989 PointsI 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.
Logan R
22,989 PointsLogan R
22,989 PointsMaybe Hampton Paulk will know the answer :)
Caleb Sylvest
7,642 PointsCaleb Sylvest
7,642 PointsThanks! You're right, looks like something must be wrong with the last couple challenges and several people are running into the issue now.