Problem Statement
What is the key difference between while and do-while loops?
Explanation
In do-while, the body runs once before checking the condition. In while, the condition is checked first.
Code Solution
SolutionRead Only
do { echo $x; $x++; } while ($x < 5);