continue is used within looping structures to skip the rest of the current loop iteration and continue execution at the beginning of the next iteration.
Note: Note that in PHP the switch statement is considered a looping structure for the purposes of continue.
continue accepts an optional numeric argument which tells it how many levels of enclosing loops it should skip to the end of.
Omitting the semicolon after continue can lead to confusion. Here's an example of what you shouldn't do.
One can expect the result to be :
0 1 3 4
but this script will output :
because the return value of the print() call is int(1), and it will look like the optional numeric argument mentioned above.
|Sites of interest: Web Hosting : Reseller Hosting : Website Hosting : HTML Editor : Web Design Templates : Free Web Hosting : ASP code examples : PHP & MySQL Code Examples|