In a PHP do...while loop, if the condition is never true, the loop will still execute once.

  • TRUE
  • FALSE
The statement is correct. In a PHP do...while loop, the code block is executed at least once, even if the condition is false. After the first execution, the condition is checked. If the condition is true, the loop continues executing the block of code. If the condition is false, the loop terminates. This behavior ensures that the code block is executed at least once, regardless of the condition. Learn more: https://www.php.net/manual/en/control-structures.do.while.php
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *