Php's continue uses simple cases. in the loop structure, continue is used to skip the remaining code in this loop and start to execute the next loop when the condition is true. Example: & lt ;? Php $ i0; while ($ I & lt; 5) {if ($ i2) {continue;} simple use case of php continue
Continue is used in the loop structure to skip the remaining code in this loop and start to execute the next loop when the condition value is true. For example:
"; $i++; } ?>
When $ I is 2, it will jump out of the loop and execute the next loop. Output result:
0134
Continue accepts an optional numeric parameter to decide to skip multiple cycles to the end of the loop. The default value is 1, that is, jump to the end of the current loop.
3) { continue 2; } echo "$i $m
"; } }?>Result:
0 0 1 0 2 0 3 0 0 1 1 1 2 1 3 1 0 2 1 2 2 2 3 2 0 3 1 3 2 3 3 3 0 4 1 4 2 4 3 4