This should do do it..
<%?php
$cellBGN="#FFFFFF";
while($row=mysql_fetch_array($p_result)) {
list($var1,$var2,$varN,$varN+1,...)=$row;
($cellBG==$cellBGN ? $cellBG="#CCCCCC" : $cellBG="#FFFFFF");
printf("<tr>\n\t<td bgcolor=\"%s\">%s</td>\n</tr>\n",$cellBG,$varN);
}
?>
---------------------
Johnny Withers
[EMAIL PROTECTED]
p. 601.853.0211
c. 601.954.9133
-----Original Message-----
From: Mike Roberts [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 29, 2001 12:12 PM
To: [EMAIL PROTECTED]
Subject: How?
I'm using PHP and Mysql.
I was wondering how you can spit out information out of a
database onto a table, but have every second row of the
table a different backround color.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php