What is the use of PHP 'continue' statement?

97. What is the use of PHP "continue" statement?

  1. breaks the loop and transfers the control to the statement written just after the loop body
  2. breaks the all loop statement (outer loops and inner loops)
  3. breaks one iteration of the loop and transfers the control to the next loop iteration
  4. All of the above

Answer: C) breaks one iteration of the loop and transfers the control to the next loop iteration

Explanation:

In PHP, the continue statement is used to break one iteration of the loop and transfer the control to the next loop iteration.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.