Here is an example of generating a table based on a query to a mysql database using php:
PHP Code:
echo "<TABLE>";
echo "<TR><TH>Username</TH><TH>Expiration Date</th><TH>Subid</TH><TH>Sub</th></tr>";
while ($row = mysql_fetch_array($result)) {
$username = $row['username'];
$active = $row['active'];
$expirationtime = $row['expirationtime'];
$email = $row['email'];
$subid = $row['subid'];
$sub = $row['sub'];
echo "<TR><TD>$username</TD><TD>$expirationtime</TD><TD>$subid</TD><TD>$sub</TD></tr>";
}
echo "</table>";
Hope that helps!