While Loop in PHP

Program 1

<html>
    <head><title>PHP Loops</title>
    <body>
     <center>
  
<?php
    //  $i=1;  // intilization
    //  $n=23;
    //  echo "Table of=".$n;
    //  while($i<=10)  //condition
    //  {
    //     echo"<br> ".$i*$n;   
    //     ++$i;   // increment 
    //  }
    
 /* 

    1 4 9 16 25........n 

      limit =16

      1 .... 10 and sum of n number

    while(condition)        if(condition)
    {                              {
         //code                               //Code
                                     }
    }
    
    
    
    
    
    
    do while
    for

    for each

     intilization
     condition
     increment/decrement
 */
     
?>
</center>
</body>
</html>

 

courses

Leave a Reply

Your email address will not be published. Required fields are marked *