PHP Do While Statement
What is Do While Structure?
Do While statement is same as the while statement, the only difference is that it evaluates the expression at the end.
In do while, the statements are executed first, then the expr1 is checked, only drawback of Do While is that it may execute statements once even if the condition is false.
In the above example the value of $c should be displayed only if its greater than 5,but using the Do while statement it displays the value of $c as 1 first and then checks the expression or condition.
$c = 6;
echo "Enter the a value less than 5";
Use the "Break" statement to terminate the code execution in a loop