Tutorial for Do.. While loop

What is Do….While Loops?

The (do-while loop) is a version of the while loop in which the state is assessed at the end of each loop iteration. A (while loop) runs a block of code once and then evaluates the condition; if the condition is true, the expression is repeated as long as the condition is true.

Syntax:-


do {
  code to be executed;
} while (condition is true);
PHP Loop and  Control Structures

Example:-

Output:-

Ashwani Kumar
Latest posts by Ashwani Kumar (see all)
Tagged : / / / / / / / / / /
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x