Continue Statement : continue « Statement « PHP






Continue Statement

 
<html>
 <head>
  <title>Continue Statement</title>
 </head>
 <body>

 <?php
  $i = 0; 
  $passes = "";

  while ( $i < 5 )
  {
    $i++;
    if( $i == 3 ) continue;
    $passes .= "$i ";
  }
  echo("Loop stopped at $i<br>");
  echo("Completed iterations:$passes");
 ?>

 </body>
</html>
  
  








Related examples in the same category

1.Continue statement
2.Using the continue Statement
3.Using the continue Statement
4.continue within a for loop
5.Using continue instead of break