for loop increment by 2
by Ramya[ Edit ] 2012-07-03 10:40:25
for loop increment by 2:
you can increment for loop by 2,
for($h=3;$h<15;$h+=2){}
for example, if you want to display only odd numbers then you can increment the variable inside the for loop by 2,
for($h=3;$h<15;$h+=2){
echo $h."
";
}