Total members 11894 |It is currently Sat Nov 23, 2024 12:02 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     -  
 HTML Table Of Contents Generator     -  
 Sort HTML table from JQuery     -  
 adding caption to table in html     -  
 OUTPUT??     -  
 what is the output of this program and how it be?     -  
 Input-Output Operations     -  
 output associate array by print_r     -  
 C++ While loop     -  



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