Create a new variable name $isIdentical. Compare the variable $a as identical (equal AND of the same type) as the string
I keep getting the error message Oops! It looks like Task1 is no longer passing.
I've tried several different methods. My current code is:
<?php $isIdentical = "true"; $a = 5; $booleanOne= $a ==="5"; ?>
What am I doing wrong... Please help!
Jason AndersTreehouse Moderator 144,854 Points
You are more or less on the right track, but there seems to be a few things going wrong here. First, a good note to remember is that instructions for challenges need to be followed exactly as they are written.
With that in mind, the first thing is I no longer see the comment that was there that instructed you to:
//Place your code below this comment
You have some code that is out-of-place and may crash the challenge.
Second, you have created a variable
$booleanOne that was not asked for, so this will need to be deleted.
Third, the instructions asked for the boolean
true to be assigned to
$isBoolean, but you have assigned the String "true", and also to the wrong variable.
Note: once you add quotation marks, everything inside the quotes becomes a string.
Finally, the result of the comparison needs to be stored in the variable
I don't normally post the correct solution, but I feel with the above explanations, seeing the corrected code will be of the most learning benefit.
<?php $a = 5; //Place your code below this comment $isBoolean = true; $isIdentical = $a === "5"; ?>
I hope this helps. Keep Coding! :)
Thanks for the help was having problems in comparing the the String variable because I was creating a variable that was not being asked for.