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 trialmouhamadoudiouf
14,915 PointsNeed help with this php quizz
Hello, I am having some issues with this quizz. I tried to assign the comparaison between $a and "5" to the variable $isIdentical. But it doesn't work. Can anyone help me? Thank you!
<?php
$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = var_dump($a === "5");
echo $isIdentical;
?>
2 Answers
jamesjones21
9,260 Pointsyou are almost there:
<?php
$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = $a === "5";
to test this all you need to do is:
var_dump($isIdentical);
mouhamadoudiouf
14,915 PointsSo it doesn't return any value right?
jamesjones21
9,260 Pointsthe variable you want to output needs to go inside of the var_dump($variable);
mouhamadoudiouf
14,915 Pointsmouhamadoudiouf
14,915 PointsThank you! I thought this wouldn't work at the first place. That's why I didn't tried it.
jamesjones21
9,260 Pointsjamesjones21
9,260 PointsWith var_dump, you don't require to echo it, it will dump the output onto screen.