php loop + 2 code example
Example 1: for loop php increment by 2
for ($i=1; $i <=10; $i+=2)
{
echo $i.'<br>';
}
Example 2: php for next loop step
for ($i = 0; $i < 10; ++$i)
{
echo "I will loop 10 times";
}
for ($i=1; $i <=10; $i+=2)
{
echo $i.'<br>';
}
for ($i = 0; $i < 10; ++$i)
{
echo "I will loop 10 times";
}