PHP continue
PHP continue is used to skip the remaining loop code of the loop. If the loop condition is not over, it will continue to run the next loop. Assuming that there is a certain condition in your loop, you need to skip and continue to run back Circle, for example, count the sales quantity of all commodities. If the sales quantity of one commodity cannot be included in this statistics, you can use continue to skip the number of the commodity and continue to count the sales quantity of other commodities, so that you can Automatically filter out this item and complete statistics on the sales of all items at once.
PHP continue example
for ($i = 0; $i <10; ++$i){
if ($i == 3){
continue;
}
echo $i; // output result 012456789
}
$i = 0;
while ( $i <10){
$i++;
if ($i == 5){
continue;
}
echo $i; // output result 1234678910
}
?>
Post a Comment
0 Comments