Overview
The do-while loop performs a segment of code repeatedly until the condition is FALSE. The do-while loop is confirmed to run at least once.
Syntax:
do {
code to be executed;
} while (condition is true);
Example:
$num = 1;
do {
echo "The number is: $num
";
$num++;
} while($num <= 5);