Total members 11895 |It is currently Fri Dec 27, 2024 3:20 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





Code:
<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>","\n";
     
$dividend = $cost * 0.10;
     echo
"<TD>The dividend is $dividend #x0024s</TD></TR>  " ,"\n";
  }
  
?>
  </TABLE>
  </BODY>
  </HTML>




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  Related Posts  to : Use for loop to output HTML table
 echo command to output HTML     -  
 HTML Scrollable table     -  
 adding caption to table in html     -  
 HTML Table Of Contents Generator     -  
 Sort HTML table from JQuery     -  
 OUTPUT??     -  
 what is the output of this program and how it be?     -  
 Input-Output Operations     -  
 output associate array by print_r     -  
 do while loop and for loop C++ example help.     -  



Topic Tags

PHP Loops






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com