Friday 28 July 2017

How to print following number table:

How to print following number table:




<table width="270px" cellspacing="0px" cellpadding="0px" border="1px">  
   <!-- cell 270px wide (8 columns x 60px) -->  
    <?php  
        //$a = 1;
      for($row=1;$row<=10;$row++)  
      {  
          echo "<tr>";
         
          for($col=1;$col<=10;$col++)  
          {  
              echo "<td>" .($col * $row). "</td>";
          }
          //$a++;
          echo "</tr>";
      }
      ?>
 </table>

No comments:

Post a Comment