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 trial

PHP PHP Basics Unit Converter Manipulating Numbers

darren murray
seal-mask
.a{fill-rule:evenodd;}techdegree
darren murray
Front End Web Development Techdegree Student 6,520 Points

Without 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

index.php
<?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
andren
28,558 Points

The 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
seal-mask
.a{fill-rule:evenodd;}techdegree
darren murray
Front End Web Development Techdegree Student 6,520 Points

hey 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