In a PHP loop, break will ______ the loop, while continue will only skip the current iteration and proceed with the next one.

  • Terminate
  • Restart
  • Skip
  • Pause
The correct option is: "Terminate." In a PHP loop, the break statement will terminate the loop entirely, meaning it will exit the loop and continue with the code after the loop. On the other hand, the continue statement will skip the current iteration and proceed with the next iteration of the loop. Learn more: https://www.php.net/manual/en/control-structures.break.php, https://www.php.net/manual/en/control-structures.continue.php
Add your answer
Loading...

Leave a comment

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