Breaking

LightBlog

Saturday 4 July 2015

PHP do while loop


do while  it can execute the statement first and check the condition after . Statement will execute once even if the expression is false .condition is checked at the end of the do while loop.
Syntax:
           do
           {
              statement ;
              increment/decrement;
             }
            while( condition) ;

                                        
do while in php


Program:

<?php
$i=1;
do
{
echo "do while"."<BR>".$i;
$i++;
}
while($i<=10);
?> 

           
  Video Tutorial
                                         
                     
Adbox