PHP Basic Tutorial

Do-While

The do-while loop is very similar to the while loop, with one major difference. The condition is checked after running each loop instead of before. The “do” part comes before the “while” part, so the block of code is run once even if the condition is false.