On Mon, Apr 09, 2001 at 12:08:10AM +0000, Mike P wrote:
> I can change the column sof a table with the following code but how do I 
> change the row colors instead.With the columns I have "i" to manipulate but 
> not with rows.
> 
> while ($row = mysql_fetch_row($result))
> {{
>       echo "<TR>\n";
>       for ($i =1;$i<mysql_num_fields($result);$i++)

This works for me.
      echo "<td ".($i & 1 ? "bgcolor=c0c0c0" : "bgcolor=cccccc").">";
-- 
Jason Stechschulte
[EMAIL PROTECTED]
--
Any false value is gonna be fairly boring in Perl, mathematicians
notwithstanding.
             -- Larry Wall in <[EMAIL PROTECTED]>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to