Join the social network of Tech Nerds, increase skill rank, get work, manage projects...
 
  • What Is The Diffrence Between Do And Do While Loop

    • 0
    • 2
    • 1
    • 2
    • 0
    • 0
    • 0
    • 0
    • 198
    Comment on it

    The Main Difference Between Do And Do While Loop Is :-

    Do while Loop :- If we use "Do While" at least one time execute the loop and then check the Condition.
    
    
    While Loop:- When we Use "While" then firstly check the condition after execute loop.
    
    Do while Example:-
    
    <?php 
    
    $i=1;//variable initialization
    
    do{
    
    echo $i; //output here
    
    echo "<br>";
    
    }while ($i > 1);
    
    ?> 
    
    While Loop Example:-
    
    <?php
    $i=1; //variable initialization
    
    while($i > 1){
    
    echo $i; //output here
    
    echo "<br>";
    }
    
    ?>
    

 0 Comment(s)

Sign In
                           OR                           
                           OR                           
Register

Sign up using

                           OR                           
Forgot Password
Fill out the form below and instructions to reset your password will be emailed to you:
Reset Password
Fill out the form below and reset your password: