Repeats a block code as long as a condition is met.
This loop statement is very similar to while, but the test comes after the block of code, which means that the code will be executed at least once.
<?php
$fruits = array("apple", "banana", "orange");
do {
print current($fruits) . " ";
} while (next($fruits));
?>
apple banana orange
This code does shows how the same result as in the while example is accomplished with do.