In this article, you will learn How to Use Do While Looping Statements in PHP. Do while statement in PHP is the same as while statement but the difference is that the condition will check after the run statements.

Syntax:

do
{
code to be executed
}
while(condition);

Example:

<?php
$i=0;
do
{ //output value 0 from 10
echo "The Number is ".$i."<br>";
$i++;
}
while($i<=10)
?>

Output:
The Number is 0
The Number is 1
The Number is 2
The Number is 3
The Number is 4
The Number is 5
The Number is 6
The Number is 7
The Number is 8
The Number is 9
The Number is 10