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

Greg Sargent
Greg Sargent
3,942 Points

Not sure what this challenge question is asking: "Add 5 to $integerOne. Subtract 1 from $integerTwo."

I've created a variable of $integerOne = 1; and then added 5 to that variable to make it $integerOne= 1 + 5;. I've also vardumped with (1+5); but neither are correct. Does anyone know what this question is looking for?

Sounds like you might be over - complicating this. Don't worry...so did I!

Have you instead tried using the += and -= operators?

2 Answers

$integerOne = 1;

$integerOne += 5;

This should work

Greg Sargent
Greg Sargent
3,942 Points

Thanks Todd and Slava. I guess I was overcomplicating things Todd! :)

$integerOne = 1;
$integerOne = $integerOne + 5;
// or
$integerOne += 5;