hallo,
Also ich habe ein problem, ich will eine dynamische schriftfarbe.
Hab es so versucht:
Geht aber irgendwie nicht, hab es auch schon mit den farbcodes versucht, ging auch nicht. (hab dann natürlich die "" bei <font color...> weggemacht)
Also ich habe ein problem, ich will eine dynamische schriftfarbe.
Hab es so versucht:
PHP:
if ($row['level'] == 1)
{
$color = "white";
}
else
if ($row['level'] == 2)
{
$color = "blue";
}
else
if ($row['level'] == 3)
{
$color = "red";
}
echo $color."<br>"; // nur zum test
if ($listcolor == 1)
{
?>
<tr bgcolor=#635C5C align="center">
<td width="10"><?php echo "#".$row['id']; ?></td>
<td><font color="<?php $color; ?>"><?php echo $row['username']; ?></font></td>
<td><a href="<?php echo "profile.php?id=".$row['id']; ?>"> Click </a></td>
</tr>
</font>
<?php
$listcolor = 0;
}
Geht aber irgendwie nicht, hab es auch schon mit den farbcodes versucht, ging auch nicht. (hab dann natürlich die "" bei <font color...> weggemacht)