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 trialMatt Winer
4,023 PointsWhat am I doing wrong?
Treehouse says I may not be multiplying correctly, can't figure out what I'd be doing wrong.
<?php
//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$integerOne += 5;
$integerTwo--;
$floatOne = 1.5;
var_dump($integerOne * $floatOne);
?>
2 Answers
Umesh Ravji
42,386 PointsHi Matt, the problem is just in the outputting at the end, use echo instead of var dump.
<?php
echo($integerOne * $floatOne);
Jennifer Nordell
Treehouse TeacherHi there, Matt! Honestly? You're not doing much wrong at all! You're using var_dump to display all the information about a variable to the page including the type. All they're looking for is for you to print out the result of the calculation to the page.
So, if I replace your var_dump
with echo
, your code passes! Hope this helps!