View Single Post
  #4 (permalink)  
Old 04-18-2008, 03:19 AM
senraj senraj is offline
D-Web Master
 
Join Date: Jul 2007
Posts: 418
senraj is on a distinguished road
Post Re: Operations in PHP

Hi,,
There also are simple increment/decrement operators, which are essentially shorthand ways of adding or subtracting one from a number:

PHP Code:
$a 5;
$a++; // $a has been incremented by 1, and now equals 6

$a--; // $a has been decremented by 1, and now equals 5

$b $a++; 
// Note that the incrementing happens after the evaluation:
// First, $b is calculated to be 25. Then, $a is
// incremented to become 6
__________________
Regards,
Senraj.A
Reply With Quote