W3C home > Mailing lists > Public > www-html@w3.org > June 2001

Re: dynamic tables

From: John Fulton <jfulton@nbcs.rutgers.edu>
Date: Thu, 14 Jun 2001 09:19:00 -0400 (EDT)
To: govind nalam <g_nalam@rediffmail.com>
cc: "www-html@w3.org" <www-html@w3.org>
Message-ID: <Pine.GSO.4.21.0106140817520.7482-100000@toolbox.rutgers.edu>

Look into PHP.  It runs on the server-side so it does not 
matter if your users have netscape or some other browser.  

Here is a quick example:

<html>
<hr><h2>A Dynamic Table</h2>
<table border=5 width="600">
<?
$one = "something";
$two = "something else";
$three = "the other thing";
for ($i = 0; $i < 40; $i++) {
   echo "<tr><th colspan=2 bgcolor=#00DDDD>$one</th></tr>";

   echo "<tr><td bgcolor=#999999>$two</td><td bgcolor=#DDDDDD>
                $three</td></tr>";
}
?>
</table>
</html> 

In the above the variables $one, $two, & $three, are supposed to
show dynamic content.  I imagine that you would be getting them 
from some data-structure if this were a real application.  

You have to have PHP installed on your webserver for the above to
work.  You would save the above code in a file called 'whatever.php'.  

  John

                                                             

On 14 Jun 2001, govind nalam wrote:

> Hi,
>   Is it possible to create Tables dynamically, and it should work in both netscape(4.7) and IE.
> Please let me know the details.
> Thank U.
> 
> regards
> g nalam
> 
> 
> 
> _____________________________________________________
> Chat with your friends as soon as they come online. Get Rediff Bol at
> http://bol.rediff.com
> 
> 
> 
> 
> 
Received on Thursday, 14 June 2001 09:19:08 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:48 GMT