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

Why is this not correct?

<?php $name = 'Mike' if ($name == 'Mike'){ $bool == 'TRUE'; }

?>

2 Answers

Hugo Paz
Hugo Paz
15,622 Points

You forgot the semi colon after declaring $name

$name = "Mike";

if($name == "Mike"){
$bool = TRUE; //if you want to assign a boolean value, if you want the string TRUE just do it as you have above.


}

There seems to be a bug in two of the code challenges for the last stage of the "PHP basics" course.

I really want that badge haha

Shawn Flanigan
Shawn Flanigan
Courses Plus Student 15,815 Points

Oliver,

This code challenge was broken for quite a while, but it seems to be working fine now. I also tried the final code challenge for the course, and that one is working as well. Let me know if you're having trouble passing either one.

Hey Shawn,

Thanks a bunch! Just got a new badge to add to my collection :-D Lovin Treehouse.