Re: please help with table
| From: | H Marc Bower | Date: | Sat, 23 Aug 2003 16:28:21 +0000 |
| Subject: | Re: please help with table | ||
| References: | 1 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-21220@lists.php.net to get a copy of this message | ||
Give this a go:
<?php
$row = 0;
$col = 0;
echo "<TABLE border=1>";
while($row < 3)
{
$row++;
echo "<TR>";
while($col < 5)
{
$col++;
echo "<TD>Row ".$row." Column ".$col."</TD>";
}
$col = 0;
echo "</TR>";
}
echo "</TABLE>";
?>
Hope that helps,
Marc
----- Original Message -----
From: "Thomas Edward Lawrence" <goodboy@fptnet.com>
To: <php-windows@lists.php.net>
Sent: Saturday, August 23, 2003 12:13 PM
Subject: [PHP-WIN] please help with table
> When I write this , it will echo 1 column with 5 rows , but I want it echo
5
> columns with 3 row , there are 5 colums(td) in every row(tr) , how I must
> write ,
> please show me , thank you .
>
> <table border="1" width="100%">
> <?
> $i = 0 ;
> while ($i < 5)
> {
> $i++ ;
> echo "<tr><td>$i</td></tr>" ;
> }
> ?>
> </table>
>
>
>
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>