<?PHP $ii=1; $sum=0; while($ii<5) { $sum += $ii; echo "$ii, "; $ii++; } //1, 2, 3, 4,?>
If there is only one statement inside, the curly braces can be removed. However, if there is more than
one statement, keyword
<?PHP $ii=1; $sum=0; while($ii<100) $sum += $ii; $ii++; echo "$ii\n"; endwhile?>
<?PHP $ii=1; $sum=0; do { $sum += $ii; echo "$ii, "; $ii++; } while($ii<0); //No output do { $sum += $ii; echo "$ii, "; $ii++; } while($ii<0); //1, ?>