<?php
$sql = "SELECT id, col1, col2, col3 FROM your_table"
$result = mysql_query($sql);
echo "<table><thead><tr>";
while ($key = array_keys(mysql_fetch_assoc($result)))
echo "<th>" . $key . "</th>;
echo "</tr></thead><tbody>";
while ($row = mysql_fetch_array($result))
{
echo "<tr>";
for (int i = 0; i < count($row); ++i)
echo "<td>" . $row[i] . "</td>";
echo "</tr>";
}
echo "</tbody></table>";
?>
oder so ähnlich zumindest. Mein PHP ist ein wenig eingerostet

Hilfe
Neues Thema
Antworten


Nach oben

