What is the difference between
1) break ends a loop completely.
2) continue just shortcuts the current iteration and moves on to the next iteration.
break and continue in PHP?1) break ends a loop completely.
2) continue just shortcuts the current iteration and moves on to the next iteration.
while ($condition_true) { <--------------------┐ continue; --- goes back here --┘ break; ----- jumps here ----┐ } | <-----------------------┘------------------
No comments:
Post a Comment