multiple variables in for loop

by Ramya 2012-07-03 10:32:13

multiple variables in for loop in php:

you can use multiple variables in for loop like,
for($var1,$var2;$var1<$cond1;$var1++,$var2)


example,
for($i=0,$j=1;$i<5;$i++,$j++){
//perform any calculation.....
}


it will reduce more line of codes.........

Tagged in:

873
like
0
dislike
0
mail
flag

You must LOGIN to add comments