I have the following code which formats a table on a webpage like this:
http://thepoolscene.com/rooms-new/
echo "<table border='1'>
<tr>
<th>Room Name</th>
<th>Address</th>
<th>Phone</th>
<th>Map</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td font color=red>" . $row['NameofLocation'] . "</td>";
echo "<td>" . $row['Address'] . ", " . $row['City'] . " " . $row['Province'] . "</td>";
echo "<td>" . $row['Phone'] . "</td>";
echo "<td>" . "<a href='http://maps.google.com/maps?q=" . $row['Address'] . "+" . $row['City'] . "+" . $row['Province'] . "&hl=en'target=“_blank” >Map</a></font></td></tr>" . "</td>";
echo "</tr>";
}
echo "</table>";
I would like to format the table with some color and space out the columns a little more evenly. Is there a way to automate the width of each column? Specifically, it is the phone number and Map field which will remain constant.