PHP Basic Tutorial
When executed, continue
skips the rest of the code inside the current iteration of the loop and jumps to the next iteration.
continue
in a for
LoopThe continue
statement stops the current iteration in the for
loop and continue with the next.
Try it yourself
continue
in a while
LoopThe continue
statement stops the current iteration in the while
loop and continue with the next.
Try it yourself
continue
in a do...while
LoopThe continue
statement stops the current iteration in the do...while
loop and continue with the next.
Try it yourself
continue
in a foreach
LoopThe continue
statement stops the current iteration in the foreach
loop and continue with the next.
Try it yourself