The do...while statement is very similar to the while statement except that the condition is checked at the end of the loop and the code inside the structure is run at least once. 

Syntax for DO - WHILE statement

<?php
    do {
       // execute code here
    }
    while (condition);
?>

Example with a DO - WHILE statement

 

›› go to examples ››