What is the continue statement used for in PHP?

  • Skipping the remaining code in the current iteration of a loop
  • Resuming the next iteration of a loop
  • Breaking out of a switch statement
  • Terminating the execution of a function
The correct option is: "Resuming the next iteration of a loop." In PHP, the continue statement is used to skip the remaining code in the current iteration of a loop and move on to the next iteration. It is commonly used when you want to skip certain iterations based on a condition. Learn more: 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 *