PDA

View Full Version : alternating background


GO ILLINI
02-04-2006, 07:30 AM
<?php
$i=0;
while ($i < $num) {

$name=mysql_result($result,$i,"name");
$type=mysql_result($result,$i,"type");
$creator=mysql_result($result,$i,"creator");
$added=mysql_result($result,$i,"added");
$description=mysql_result($result,$i,"description");
$id=mysql_result($result,$i,"id");

?>
<tr>
<td>2<font face="Arial, Helvetica, sans-serif"><? echo "$id"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$name"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$type"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$creator"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$added"; ?></font></td>
<td><font face="Arial, Helvetica, sans-serif"><? echo "$description"; ?></font></td>
</tr>
<?

++$i;


}

?>
I have tried so many things that just didnt seem to work. Can anyone make this with alertnating backgrounds?

Thanks,
ILLINI

Bill Posters
02-04-2006, 11:43 AM
http://www.phpfreaks.com/tutorials/5/0.php

Btw, you really need to start looking at ditching those font elements in favour of the more efficient option of CSS.