Saya sarankan membaca PHP/MySQL .
Tajuk HTML: Buka tabel Anda, buat header Anda
<table>
<tr>
<td>Rank</td>
<td>User</td>
<td>Score</td>
</tr>
PHP: Buat baris secara dinamis untuk setiap pengguna
<?php
$result = mysql_query("SELECT user, score FROM leaderboard ORDER BY score DESC");
$rank = 1;
if (mysql_num_rows($result)) {
while ($row = mysql_fetch_assoc($result)) {
echo "<td>{$rank}</td>
<td>{$row['user']}</td>
<td>{$row['score']}</td>";
$rank++;
}
}
?>
HTML Footer: perlu menutup tabel
</table>