Increment & Decrement Operators in PHP

Increment & Decrement Operators in PHP
Rating: 5 - 1 Votes

Increment & Decrement Operators in PHP

phpIncrement and decrement operators in PHP increment and decrement value by 1.  There are 4 types of increment and decrement operators.

  • Pre-Increment++$variable
  • Post-Increment$variable++
  • Pre-Decrement–$variable
  • Post-Decrement$variable–

Example for increment and decrement operators is given below.