• Post category:PHP

PHP Continue Statement with Example

PHP Continue Statement

Learn about continue statement in PHP.

PHP Continue Statement

It continues the loop, the PHP engine skips statements under the continue statement, and transfers the control to the condition part of the loop in the context of while and do while loops. In contrast, in the context of for loop, control is transferred to increment. decrement part.

Syntax:

continue;

continue inside for the loop

for($i=1; $i<6; $i++){
if($i==3){
continue;
}
echo $i"<br/>";
}

Leave a Reply