PHP Do While Loop

Do While loop looks similar to While loop but it is different loop as compared to while loop because here the given condition is checked at the bottom of the loop.

It is to be noted that do while loop is guaranteed to be executed at least one time.

Syntax

PHP Do While Loop Example

This will produce following result