Re: Table Output Question
| From: | Jeff Grossman | Date: | Tue, 15 Nov 2005 02:27:44 +0000 |
| Subject: | Re: Table Output Question | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-40667@lists.php.net to get a copy of this message | ||
Bastien Koert <bastien_k@hotmail.com> wrote:
> <?php
>
> $row1 = "FFFFFF";
> $row2 = "AAAAAA";
> $counter = 0;
>
> while ($rows = mysql_fetch_array($result))
> {
> $color = ($counter % 2 ==0) ? $row1 : $row2 ;
>
> echo "<tr style='backgroundcolor:$color'><td>...";
>
> }
>
>
> bastien
>
>
> ps: a class css definition would be better here
Thanks for the help. After reading a couple of the responses, I
couldn't believe that I did not think of this. I don't know a lot about
CSS yet (just purchased a book). But, could you share with me about the
ps line?
Thanks again for you help.
Jeff