Re: change color
| From: | Evan Nemerson | Date: | Tue, 27 May 2003 02:34:23 +0000 |
| Subject: | Re: change color | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149032@lists.php.net to get a copy of this message | ||
echo (($i % 2) == 0) ? "Color 1": "Color 2";
On Monday 26 May 2003 07:29 pm, Aris Santillan wrote:
> hi
>
> how can i alternate row color for this routine?
>
> <?
>
> $query = mysql_query("SELECT * from data");
> $num = mysql_num_rows($query);
> for($i=0; $i<=$num; $i++)
> {
> $row = mysql_fetch_array($query);
> echo $row[0];
> }
>
>
> ?>
--
Science has done more for the development of western civilization in one
hundred years than Christianity did in eighteen hundred years.
-John Burroughs