Hi Balu,
To add one to a variable or "increment" use the "++" operator:
$x++; Which is equivalent to $x += 1; or $x = $x + 1;
To subtract 1 from a variable, or "decrement" use the "--" operator:
$x--; Which is equivalent to $x -= 1; or $x = $x - 1;
Mar 17, 2010