I want to output my data into a three-column table, but I do not understand where to place my HTML tables or if I need additional coding.
With the following example, the results contain duplicates:
$query = "SELECT * FROM customers";
$result = mysql_query($query);
echo "<table width='600' border='1' cellspacing='4' cellpadding='0'>";
while ($row = mysql_fetch_array($result))
{
extract($row);
echo " <tr>
<td>Hi, my name is $name and I'm $age years old.</td>
<td>Hi, my name is $name and I'm $age years old.</td>
<td>Hi, my name is $name and I'm $age years old.</td>
</tr>"; }
echo "</table>";
// Desired Table Format
+--------+--------+--------+
+--------+--------+--------+
+--------+--------+--------+