PHP Incrementing & Decrementing Operators
|What is the meaning of ++ increment operator and - – decrement operator and how can we use it ?
Below is a small explanation on what it does,
++$a means Pre-increment, It increments $a by one, then returns $a.
$a++ means Post-increment, It returns $a, then increments $a by one.
- – $a means Pre-decrement, It decrements $a by one, then returns $a.
$a – - means Post-decrement, It returns $a, then decrements $a by one.