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

stuck on second task of code challenge cover manipulating variables.

The second task asks you to add 5 to $integerOne and subtract 1 from $integerTwo. I have done that using var_dump. I checked the code in workspaces to ensure it is returning a value. However, the challenge says that I haven't changed the variable. Any ideas on what the problem is?

index.php
<?php

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





?>

2 Answers

Treehouse wants you to solve this problem in a very straightforward way, even if there are several solutions to this problem.

<?php

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

$integerOne += 5; $integerTwo -= 1;

$floatOne = 1.5;

echo $integerOne * $floatOne;

?>

I do not have time to explain.

Thank you for your help. It was really bugging me that the var_dump wasn't working. I guess there was an easier way to solve the problem than I was using.

You are welcome! : )