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.

PHP PHP Basics Unit Converter Manipulating Numbers

Need help on PHP Basics Challenge Task 3 of 3...multiply $integerOne by $floatOne and display result.

Error message says to use echo not var_dump...which I'm doing. Below are my answers to the three challenges...can't get past the final (3rd) task which is to multiply $integerOne by $floatOne and display the result. I created a variable named $results. Not sure what I'm doing wrong.

<?php //Place your code below this comment $integerOne = 1; $integerTwo = 2; $floatOne = 1.5;

$integerOne = $integerOne + 5; var_dump ($integerOne); $integerTwo = $integerTwo - 1; var_dump ($integerTwo);

$results = $integerOne * $floatOne; echo $results;

?>

index.php
<?php

//Place your code below this comment
$integerOne = 1;
$integerTwo = 2;
$floatOne = 1.5;

$integerOne = $integerOne + 5;
var_dump ($integerOne);
$integerTwo = $integerTwo - 1;
var_dump ($integerTwo);


$results = $integerOne * $floatOne;
echo $results

?>

1 Answer

Delete your two var_dump statements and you should pass.