sometimes things that seem to be the most simple drive me insane 😉
Question: i have this query which outputs <td>'s with the results in it, But how do i alternate the colors, say one row #000000 the other #FFFFFF ?? i already have it set to output in #000000, but how do i make the next results output in #FFFFFF ? and visa versa?
<table class="smalltext" border="0" cellspacing="1" width="98%">
<tr>
<td width="100%" colspan="7"> There are currently $totalservers servers on our list, last update was $updated<hr /></td>
</tr>
<tr>
<td width="15%"> <b>number</b></td>
<td width="35%"><b>name</b></td>
<td width="15%"><b>map</b></td>
<td width="15%"><b>ip</b></td>
<td width="10%"><b>port</b></td>
<td width="10%"><b>players</b></td>
</tr>
$result = mysql_query("SELECT * FROM `details` LIMIT " . $_GET['page'] . ", $pagelimit");
while($serverinfo = mysql_fetch_array($result)) {
<tr>
<td width="15%" bgcolor="#000000"> $serverinfo[number] </td>
<td width="35%" bgcolor="#000000"> $serverinfo[name] </td>
<td width="15%" bgcolor="#000000"> $serverinfo[map] </td>
<td width="15%" bgcolor="#000000"> $serverinfo[ip] </td>
<td width="10%" bgcolor="#000000"> $serverinfo[port] </td>
<td width="10%" bgcolor="#000000"> $serverinfo[min]/$serverinfo[max] </td>
</tr>
}
<tr>
<td width="100%" colspan="7" align="center">$pagination</td>
</tr>
</table>
PS. dont mind the raw html not being escaped, its coming from a template ..