Ordinal suffix - 1st, 2nd, 3rd... osv
Hej eksperter!Har et rankingsystem hvor jeg gerne vil have de 10 bedste brugere.
Hvordan skal jeg indsætte Ordinal Suffix i min kode?
<?php
$res_avg = mysql_query("SELECT username, AVG(rating) as avg_rating FROM ratings GROUP BY username ORDER BY avg_rating DESC LIMIT 10 ");
while($row_avg = mysql_fetch_array($res_avg))
echo'<table border="1"><tr>
<td><text style="color:white">'.$row_avg['username'].' =</text></td>
<td><u>'.round($row_avg['avg_rating'],1).'</u><br /></td>
</tr>
</table>';
?>
Tak på forhånd!