Re: [PHP-WIN] please help with table

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux