July 25, 2017

Core PHP: The Do While Loop (5.6)

The do...while Loop


The do...while loop will always execute the block of code once, check the condition, and repeat the loop as long as the specified condition is true.

Syntax:
do {
  code to be executed;
} while (condition is true);

Regardless of whether the condition is true or false, the code will be executed at least once, which could be needed in some situations.

No comments:

Post a Comment