er det mig der sover eller kan php ikke regne?
heysa, jeg har et lille problem med nogle font colorsførst et lille link:
http://achromic.lamerz.dk/?page=matches
og her en smule kode:
$pmatchres = mysql_query("SELECT * FROM matches WHERE played='YES' ORDER BY id DESC");
while($pmatch = mysql_fetch_array($pmatchres)) {
if ($pmatch[usscore] > $pmatch[themscore]) {
$color = "#10E500";
}
elseif ($pmatch[usscore] = $pmatch[themscore]) {
$color = "#ECD908";
}
elseif ($pmatch[usscore] < $pmatch[themscore]) {
$color = "#FF0000";
}
?>
<tr>
<td width"25"> </td>
<td class="indhold"><?=$pmatch[date];?></td>
<td class="indhold"><?=$pmatch[opponent];?></font></td>
<td class="indhold"><?=$pmatch[event];?></td>
<td class="indhold"><b><FONT FACE=Verdana COLOR=<?=$color;?>><?=$pmatch[usscore];?> - <?=$pmatch[themscore];?></FONT></b></td>
<td><a class="indhold" href=?page=matchdetails&id=<?=$pmatch[id];?>>[info]</a></td>
</tr>
<? } ?>
jeg har indsat 3 forskellige cases i min tabel så jeg gerne skulle få alle 3 farver men kig på mit link og se hvad der sker, det eneste der virker, er den 1. case hvor usscore er større en themscore
