Example
Use continue to skip over the "5" part of the code in a loop:
html
<?php
for($i = 1; $i <= 10; $i++) {
if($i == 5) {
continue;
}
echo "$i <br>";
}
?>
Definition and Usage
The continue keyword is used to is used to end the current iteration in a for, foreach, while or do..while loop, and continues to the next iteration.
Related Pages
Use the break keyword to end the loop completely