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 trialeva sokolovsky
8,111 PointsI Don't understand where I am wrong
Multiply $integerOne by $floatOne and display the results.
<?php
//Place your code below this comment $integerOne = 1; $integerTwo = 2; $floatOne = 1.5; echo $integerOne = 1 + 5; echo $integerTwo = 2 - 1; $res = $integerOne * $floatOne; echo "\n " . $res; ?>
<?php
//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;
echo $integerOne = 1 + 5;
echo $integerTwo = 2 - 1;
$res = $integerOne * $floatOne;
echo "\n " . $res;
?>
1 Answer
Adam N
70,280 PointsOnly echo the result for this step. Also, you dont need to include a linebreak.
Please mark my answer as the 'best answer' if it helps you out!
Amal Shanker
7,200 PointsAmal Shanker
7,200 PointsThanks for response Adam N! I figured that i need to just echo the product rather than adding the product to the variable and then echo it.