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 trialAaron John
203 PointsWhat am I doing wrong?
I created a variable $isIdentical then assigned the var_dump($a==="5") to it.
this is what i was tasked to do, then why is it saying "I cannot see a variable"
<?php
$a = 5;
//Place your code below this comment
$isBoolean = true;
$isIdentical = var_dump($a==="5");
echo $isIdentical;
?>
1 Answer
Tianni Myers
10,453 PointsHey Aaron,
It looks like you wrapped quotations around a number turning into a string and not a numeric value. Try it like this:
$isIdentical = var_dump($a===5);
Aaron John
203 PointsAaron John
203 PointsNop,
<?php $a = 5; //Place your code below this comment $isBoolean = true; $isIdentical = var_dump($a===5);
?>
it's still showing I cannot see a variable named $isIdentical
Tianni Myers
10,453 PointsTianni Myers
10,453 PointsOohh you are trying to var_dump the variable a?
$isIdentical = var_dump($a);
Aaron John
203 PointsAaron John
203 PointsI am trying to Create a new variable name $isIdentical. Compare the variable $a as equal and of the same type as the string "5" and assign the results to $isIdentical.