
This is for the beginners…
A nice and simple way to increase an integer variable by 1:
{code type=php}
$i = 17;
$i++;
echo $i; // prints “18”
{/code}
I am sure most of you know this one but if you don’t then of course it is very useful. It also works with subtraction:
{code type=php}
$i = 88;
$i–;
echo $i; // prints “87”
{/code}