php increment 1 code example Example 1: php increment variable // To increment a variable by 1 $var++; Example 2: php increment variable by 1 $variable++;