Articles → PHP → Break and continue statements in PHP

Break and continue statements in PHP





  1. Software requirement
  2. Technical knowledge
  3. Break statement
  4. Continue statement

Software requirement




  1. XAMPP is installed on your machine.
  2. Notepad (or any text editor) is installed on your machine.

Technical knowledge





Break statement






for ($i = 1; $i < 10; $i++) {
    echo $i;

    if ($i == 5)
       break;





Continue statement






for ($i = 1; $i < 10; $i++) {
    echo $i;

    if ($i == 5)
       continue;





Posted By  -  Karan Gupta
 
Posted On  -  Wednesday, September 3, 2014

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250