\n";
// Run the query
$result = mysql_query($query,$db);
// Print the table header
echo "\n";
echo "| a | b |
\n";
// Print the data in our table
while ($row = mysql_fetch_assoc($result))
echo "| " . $row["columna"] . " | " . $row["columnb"] .
" |
\n";
// Another way of printing the table
/* while ($myrow = mysql_fetch_row($result))
printf("| %s | %s |
\n", $myrow[0], $myrow[1]);
*/
// A third way of printing the table
/* while ($row = mysql_fetch_assoc($result)) {
print "\t\n";
foreach ($row as $field) {
print "\t\t| $field | \n";
}
print "\t
\n";
}*/
// Print the table footer
echo "
\n";
mysql_close($db);
}
?>