$x++; // equivalent to $x = $x+1;
$x--; // equivalent to $x = $x-1;
$x++; // post-increment
$x--; // post-decrement
++$x; // pre-increment
--$x; // pre-decrement
The difference is that the post-increment returns the original value before it changes the variable, while the pre-increment changes the variable first and then returns the value.
Example:
$a = 2; $b = $a++; // $a=3, $b=2
$a = 2; $b = ++$a; // $a=3, $b=3