Re: change color
| From: | Tom Ray [Lists] | Date: | Tue, 27 May 2003 03:01:25 +0000 |
| Subject: | Re: change color | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-149036@lists.php.net to get a copy of this message | ||
This was a question I've been kicking around myself. But Evan's answer is a bit confusing to me, can someone clear it up? Evan, can you explain it a bit better? Maybe show how it is supposed to look in the overall code?
Thanks!
Evan Nemerson wrote:
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]; } ?>