do-while
suggest changeA do-while loop executes its block once, then repeats the block while the condition is true.
$i = 0;
do {
$i++;
echo $i;
} while ($i < 10);
// Output: 12345678910
For detailed information, see the Loops topic.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents