I'm working on getting an html table up on my site. It pulls some info from an mssql database. I'm trying to find a way to display the table best, because it's a pretty big table. I first tried just putting one long horizontal table, but it took up 3 times the screen. I then tried doing it in multiple rows, but I found that it would look bad if there were multiple records in the table.
I'm now trying to do a vertical table, but I can't figure out how to make it so the rows in the table are level with each other.
Here's my code:
echo "<table border='1'>
<td>
<table><tr><th>Name of Center</th></tr></table>
<table><tr><th>Contact Name</th></tr></table>
<table><tr><th>Title</th></tr></table>
<table><tr><th>Street Address</th></tr></table>
<table><tr><th>City</th></tr></table>
<table><tr><th>State</th></tr></table>
<table><tr><th>Zipcode</th></tr></table>
<table><tr><th>Phone</th></tr></table>
<table><tr><th>Fax</th></tr></table>
<table><tr><th>Email</th></tr></table>
<table><tr><th>Director</th></tr></table>
<table><tr><th>HA 1</th></tr></table>
<table><tr><th>Address 1</th></tr></table>
<table><tr><th>Phone 1</th></tr></table>
<table><tr><th>HA 2</th></tr></table>
<table><tr><th>Address 2</th></tr></table>
<table><tr><th>Phone 2</th></tr></table>
<table><tr><th>HA 3</th></tr></table>
<table><tr><th>Address 3</th></tr></table>
<table><tr><th>Phone 3</th></tr></table>
<table><tr><th>Number of Years Operational</th></tr></table>
<table><tr><th>Annually</th></tr></table>
<table><tr><th>Coverage Limit</th></tr></table>
<table><tr><th>Coverage Deductible</th></tr></table>
<table><tr><th>2012</th></tr></table>
<table><tr><th>2011</th></tr></table>
<table><tr><th>2010</th></tr></table>
<table><tr><th>2012</th></tr></table>
<table><tr><th>2011</th></tr></table>
<table><tr><th>2010</th></tr></table>
<table><tr><th>Paid 2012</th></tr></table>
<table><tr><th>Paid 2011</th></tr></table>
<table><tr><th>Paid 2010</th></tr></table>
<table><tr><th>Instructions</th></tr></table>
</td>";
while($row = mssql_fetch_array($result)) {
echo "<td>";
echo "<table><tr>" . $row['Name_of_Center'] . "</tr></table>";
echo "<table><tr>" . $row['Contact_Name'] . "</tr></table>";
echo "<table><tr>" . $row['Title'] . "</tr></table>";
echo "<table><tr>" . $row['Street_Address'] . "</tr></table>";
echo "<table><tr>" . $row['City'] . "</tr></table>";
echo "<table><tr>" . $row['State'] . "</tr></table>";
echo "<table><tr>" . $row['Zipcode'] . "</tr></table>";
echo "<table><tr>" . $row['Phone'] . "</tr></table>";
echo "<table><tr>" . $row['Fax'] . "</tr></table>";
echo "<table><tr>" . $row['Email'] . "</tr></table>";
echo "<table><tr>" . $row['Director'] . "</tr></table>";
echo "<table><tr>" . $row['HA1'] . "</tr></table>";
echo "<table><tr>" . $row['HA1_Address'] . "</tr></table>";
echo "<table><tr>" . $row['HA1_Phone'] . "</tr></table>";
echo "<table><tr>" . $row['HA2'] . "</tr></table>";
echo "<table><tr>" . $row['HA2_Address'] . "</tr></table>";
echo "<table><tr>" . $row['HA2_Phone'] . "</tr></table>";
echo "<table><tr>" . $row['HA3'] . "</tr></table>";
echo "<table><tr>" . $row['HA3_Address'] . "</tr></table>";
echo "<table><tr>" . $row['HA3_Phone'] . "</tr></table>";
echo "<table><tr>" . $row['No_of_Years_Operational'] . "</tr></table>";
echo "<table><tr>" . $row['Annually'] . "</tr></table>";
echo "<table><tr>" . $row['Coverage_Limit'] . "</tr></table>";
echo "<table><tr>" . $row['Coverage_Deductible'] . "</tr></table>";
echo "<table><tr>" . $row['Donors_2012'] . "</tr></table>";
echo "<table><tr>" . $row['Donors_2011'] . "</tr></table>";
echo "<table><tr>" . $row['Donors_2010'] . "</tr></table>";
echo "<table><tr>" . $row['Claims_2012'] . "</tr></table>";
echo "<table><tr>" . $row['Claims_2011'] . "</tr></table>";
echo "<table><tr>" . $row['Claims_2010'] . "</tr></table>";
echo "<table><tr>" . $row['Paid_2012'] . "</tr></table>";
echo "<table><tr>" . $row['Paid_2011'] . "</tr></table>";
echo "<table><tr>" . $row['Paid_2010'] . "</tr></table>";
echo "<table><tr>" . $row['Instructions'] . "</tr></table>";
echo "</td>";
}
echo "</table>";