http://w3schools.com/php/php_looping.aspI'm extremely new to web design and programming so was hoping some one could clarify the below as it may be my understanding that is incorrect.In the tutorial<html><body><?php $i=1;do { $i++; echo "The number is " . $i . "<br />"; }while ($i<=5);?></body></html>
which would output:
The number is 2The number is 3The number is 4The number is 5The number is 6
But if my understanding of loops is correct this isn't strictly right, the i increment should be below the echo line:
<?php $i=1;do { echo "The number is " . $i . "<br />"; $i++; }while ($i<=5);?>
which would return an output of:
The number is 1The number is 2The number is 3The number is 4The number is 5
If I'm mistaken I apologise, I'm alittle confused./Comf