tony09uk
07-05-2012, 07:24 PM
I am currently going over my basics and trying to make it second nature (without much luck :s)
I cant work out an issue with the for loop
for($r = 1; $r <=20; $r++){
echo $r . "<br/>";
}
works fine but:
for($r = 1; $r <=20; $r*2){
echo $r . "<br/>";
}
does not. Why? I assumed as I was using a mathematical operator it would work just fine.
I cant work out an issue with the for loop
for($r = 1; $r <=20; $r++){
echo $r . "<br/>";
}
works fine but:
for($r = 1; $r <=20; $r*2){
echo $r . "<br/>";
}
does not. Why? I assumed as I was using a mathematical operator it would work just fine.