for loop decrement in php by 2 code example Example: for loop php increment by 2 for ($i=1; $i <=10; $i+=2) { echo $i.'<br>'; }