So I am working on a Competition Ladder of sorts...and am stymied with a portion of it. Think I have figured the rest out.
I have the below snippet of code that works just fine. It will output rows of data for everyone equaling the same ladder ID. For any names I have in this ladder, it will bold my names (it matches my logged-in Forum ID with the $myrow ForumID variable.
Here is my problem. I want to be able to color BLUE (or whatever) the THREE names above each one of my guys. I singled my guys out easily enough using the IF/ELSE below, but don't know how to tell it to format the three names above me differently.
Any ideas? Hope I was clear, and thanks for any suggestions!
$result = mysql_query("SELECT * FROM dl_Members WHERE M_Active='Y' AND M_LadderId=$lid ORDER BY M_Rank ASC");
if ($myrow = mysql_fetch_array($result)) {
do {
if ($ForumId == $myrow["M_ForumId"]) {
printf("<td align=\"right\">%s. </td><td><b>%s</b></td><td align=\"center\">%s</td><td align=\"center\">%s</td><td align=\"center\">%s</td><td>BAH</td></tr>\n", $myrow["M_Rank"], $myrow["M_CharName"], $myrow["M_Win"], $myrow["M_Loss"], $myrow["M_Forfeit"]);
}
else {
printf("<td align=\"right\">%s. </td><td><a href=\"%s?cid=%s\">%s</a></td><td align=\"center\">%s</td><td align=\"center\">%s</td><td align=\"center\">%s</td><td>BAH</td></tr>\n", $myrow["M_Rank"], $PHP_SELF, $myrow["M_Id"], $myrow["M_CharName"], $myrow["M_Win"], $myrow["M_Loss"], $myrow["M_Forfeit"]);
}
}
while ($myrow = mysql_fetch_array($result));
echo "</table><br /><br />";
} [code=php]