PHP learn - Do While Loop
The difference between do...while and while is that their values are checked at different timings.
Do-while Regardless of whether the while judgment is true, the code code block loop statement is executed once and guaranteed to be executed once (the true value of the expression is checked after each loop).
However, our while loop above will check the Boolean decision area and set it up. If it is not established, it will not be executed.
Check ($x is less than or equal to 5). As long as $x is less than or equal to 5, the loop will continue to run, anyway, the loop endsExample :
This number is 2
This number is 3
This number is 4
This number is 5