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

Won't add or subtract

It won't add to make up to 6 or 1 respectively. When I have this it say's it integerOne needs to be 1 but when I don't it say's it needs to be changed. I don't understand and I'm overwhelmed for some reason.

Line 1: <?php Line 2: Line 3: //Place your code below this comment Line 4: $integerOne = 1 + 5; Line 5: $integerTwo = 2 - 1; Line 6: $floatOne = 1.5; Line 7: ?>

1 Answer

Mark Sebeck
MOD
Mark Sebeck
Treehouse Moderator 37,905 Points

Hi Ross Christie So when it says to add 5 to integerOne they don’t want you to do it in the declaration. They want you to do it on another line.

Something like

$integerOne = $integerOne + 5.

The reason is in real code the tasks are not this simple. You might not know the value of integerOne. Most likely it will be a dynamic value passed into the function. You just know you need to add 5 to what ever the current value is.

Hope this helps and keep learning!

Thank you, it did! Doing PHP Basics straight after doing CSS Basics is really overwhelming my head. And my deadline is tomorrow