This site is mobile accessible. Press the "Tap Here" button to use a different font-size.
Smartphone icons created by Freepik - Flaticon
The number is: 6
<?php // Initialize the loop counter ($x), and set the start value to 6 $x = 6; do { echo "The number is: $x <br>"; // Increase the loop counter value by 1 for each iteration $x++; } // Continue the loop as long as $x is less than or equal to 5 while ($x <= 5); ?>
Note: In a
loop the condition is tested AFTER executing the statements within the loop. This means that the loop will execute its statements at least once, even if the condition is false.