I apologize if this has been posted before. I am new to PHP and pretty much coding in general. My question is: how can I display the results from the following query in a html table? When I pull it, it comes out all bunched together. Is there a way to include row heading in the table as well?
// generate a list of all users.
$sql = "SELECT * FROM users";
$res = mysql_query($sql);
$num_rows = mysql_num_rows($res);
echo "There are a total of ".($num_rows)." in this query.";
echo "<br>";
while($row = mysql_fetch_assoc($res))
{ echo $row[firstname].$row[lastname].$row[phone].$row[email]."<br>";
}
echo "End of list";
Thank you very much for your time.