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

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.