Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Anja Leko
Courses Plus Student 510 PointsI don't understand why this is incorrect?
<?php
//Place your code below this comment $integerOne = 1; $integerTwo = 2; $floatOne = 1.5; $integerOne = $integerOne + 5; $integerTwo = $integerTwo - 1; var_dump ($integerOne); var_dump ($integerTwo); $sum = $integerOne * $floatOne; var_dump ($sum); echo "$sum"; ?>
<?php
//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;
$integerOne = $integerOne + 5;
$integerTwo = $integerTwo - 1;
var_dump ($integerOne);
var_dump ($integerTwo);
$sum = $integerOne * $floatOne;
var_dump ($sum);
echo "$sum";
?>
2 Answers

Jennifer Nordell
Treehouse TeacherHi there! The challenge is expecting you display exactly one number, but you are also using a series of var_dump
which is displaying those values as well along with other information about the variables.
Take a look at the Bummer! message:
Bummer! Make sure you use "echo" instead of "var_dump"
Erasing all the lines with the var_dump
causes your code to pass the final step. Hope this helps!

Anja Leko
Courses Plus Student 510 PointsHi, thank you, that was the problem :)