Source Code : Use for loop to output HTML table

PHP Is Open Source Programming Language You Can Download and use It, You required xampp server and wamp server . You download From xampp server from https://www.apachefriends.org/download.html. Click Here to download
We provide this code related to title for you to solve your developing problem easily. Libraries which is import in this program you can download from http://php.net/. Click Here or search from google with Libraries Name you get jar file related it and also http://php.net/ is a official site

Use for loop to output HTML table

 <HTML>
  <HEAD>
  <TITLE>Value of Shares</TITLE>
  <H3>Table Showing Cost of Shares</H3>
  <BODY>
  <TABLE BORDER=1>
  <?php
  for ($shares = 1; $shares <= 20; $shares++){
     $cost = $shares * 20;
     echo "<TR><TD>The cost of $shares share/s is $cost #x0024s</TD>","
";
     $dividend = $cost * 0.10;
     echo "<TD>The dividend is $dividend #x0024s</TD></TR>  " ,"
";
  }
  ?>
  </TABLE>
  </BODY>
  </HTML>

           
       

Thank with us