What is the pre/post increment/decrement ?
By Balu Prasad
post/pre increment/decrement.....
Teacher SiliconIndia replied to Balu Prasad Wednesday, March 17, 2010
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;