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.

darren murray
Front End Web Development Techdegree Student 6,520 PointsWithout changing the value of $integerOne or $floatOne, multiply $integerOne by $floatOne and display the results.
im not really sure what else to type. I've multiplied $integerOne by $floatOne but in my preveiw it states I've got the total of 619. i have no idea how i got that number
<?php
//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$integerOne += 5;
echo $integerOne;
$integerTwo -=1;
echo $integerTwo;
$floatOne = 1.5;
echo $integerOne * $floatOne;
?>
3 Answers

andren
28,538 PointsThe preview screen shows all of the printed output. The 6 comes from you printing $integerOne
and the 2 comes from printing $integerTwo
. echo
does not add spaces on it's own which is why it looks like one large number.
If you remove the first two echo
statements in your code then you will be able to pass.

darren murray
Front End Web Development Techdegree Student 6,520 Pointshey thanks for the answer, i tried removing the first two echos and i still couldn't pass. once removing my first two challenges my code no longer works

darren murray
Front End Web Development Techdegree Student 6,520 Pointsthank God, it worked haha, i spent like an hour staring at the screen