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

Wayne Wilkinson
Wayne Wilkinson
14,112 Points

PHP Basics If / ElseIf Conditionals Challenge

I am told "Under the variable $name create a if statement that test to see that the $name variable is set to the string 'Mike'."

I type in:

$name = 'Mike';

if ( $name == 'Mike' ) {

}

When I click on "Check Work", it tells me that it cannot see my if statement. I do not see anything wrong.

Hi Wayne,

This challenge is currently having problems. As far as I know the staff has been alerted and should be working on the problem.

Your code looks correct as long as you have it in the php block.

Wayne Wilkinson
Wayne Wilkinson
14,112 Points

Thanks for the reply. I just though I would let you know that the challenge at the end of the segment (on loops I think) is also having the same problem (cannot see foreach loop).

2 Answers

I am having the same problem!

So frustrating, I want that badge xD

Jason Dunavant
Jason Dunavant
1,502 Points

This challenge (php conditionals code challenge) is still broken. When I get to task 3 it says my task 1 is no longer passing...

<?php $name = 'Mike';

if( $name == 'Mike' ){

}

?>

Hi Jason,

I tried the challenge and it's working fine for me. What code are you trying for task 3?