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 Arithmetic Operators

what would cause the syntax error?

what would cause a syntax error when adding $a = $a + 5; / var_dump($a);
I followed the steps of the video yet still come across the same problem.

this is my code :

$a = 5;
$b = 10;

  var_dump($a * $b); 
  var_dump($a / $b); 

$a = $a + 1;
  var_dump($a); /* 5 + 1 = 6*/

$a ++;
var_dump($a); /* 6 + 1 = 7*/

$a --;
var_dump($a); /* 7 - 1 = 6*/


var_dump($a--);
var_dump($a);

$a = $a + 5;  ------ this is where it says I have an error.
var_dump($a);

fixed code formatting

Assuming you don't have have anything after the semicolon in $a = $a +5; in your actual code it doesn't look like anything is wrong.

I ran your code without any errors.