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!
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
Pablo Monsell241 Points
It says there is an unexpected error with line 8, how do I subtract 1 from $integerTwo?
<?php //Place your code below this comment $integerOne = 1; $integerTwo = 2; $floatOne = 1.5; var_dump($integerOne++) var_dump($integerTwo-1) ?>
Simon Coates28,693 Points
You need to use semicolons to end statements generally.
(I assume the code above is just you experimenting. If not, for part2, you need to reassign the altered value back to the variable. eg
<?php //Place your code below this comment $integerOne = 1; $integerTwo = 2; $floatOne = 1.5; $integerOne = $integerOne + 5; // or use += as a shortform $integerTwo--; //this translates to $integerTwo = $integerTwo - 1; ?>