Counting to 10 with do ... while : do while « Statement « PHP






Counting to 10 with do ... while

 
<?php

$num = 1;

do {
    echo "Number  is ".$num."<br />";
    $num++;
} while ($num <= 10);

echo "Done.";

?>
  
  








Related examples in the same category

1.Do-While Loop
2.do while loop with counter
3.do while with integer counter
4.do...while loop is executed at least once
5.Break in Nested Loops
6.Do while loop
7.The do...while Statement