Which of the following are true about the break and continue statements in PHP?

  • The break statement is used to skip the rest of the loop iteration.
  • The continue statement is used to terminate the current loop.
  • The break statement is used to terminate the current loop.
  • The continue statement is used to skip the rest of the loop iteration.
The correct option is: "The break statement is used to terminate the current loop." and "The continue statement is used to skip the rest of the loop iteration." These statements control the flow of a loop in PHP and allow you to interrupt the loop execution or skip certain iterations. 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 *