continue

Passes control to the next iteration of the loop code block in which it appears, bypassing any remaining statements within that iteration of the code block

Displays:

$myVar is currently 0
$myVar is currently 1
$myVar is currently 2
$myVar is currently 3
$myVar is currently 4
$myVar is currently 5
$myVar is currently 6
$myVar is currently 8
$myVar is currently 9 

 

When the if condition for $myVar evaluated to 7,the loop continued through the other iterations, bypassing 7

Leave a Reply