

Code: Select all
<table>
<tr>
<th>Username</th>
<th>Rank</th>
</tr>
<?php
// Your query
$query = mysql_query("SELECT * FROM `users`");
// loop through the results
// $row = array of the row
while( $row = mysql_fetch_assoc($query) )
{
echo '<tr>'; // new HTML table row
echo '<td>' . $row['username'] . '</td>'; // column with username
echo '<td>' . $row['rank'] . '</td>'; // column with rank
echo '</tr>'; // close the HTML table row
}
?>
</table>