/* */ Click to Join Live Class with Shankar sir Call 9798158723

PHP Continue statement ?


The continue statement is used to bring the program control to the beginning of the loop. The continue statement skips some lines of code inside the loop and continues with the next iteration.


Syntax:-

While(condition)
{
action -1
continue;
action n;
}

Q) W.A.P using PHP continue statement
 <html>
 <body>
 <?php
 for( $i=1;$i<=5;$i++)
 {
 if($i==2)
 {
 continue;
 }
 echo $i;
 }
 ?>
 </body>
 </html>
Output
1
3
4
5