Hello All,
I've been trying to get my table so the width stays at 80% and the text wraps itself inside the table. The "details" field however can be very long. The problem is my table stretches and the section details will go on 3 long lines rather than a bunch of smaller ones. Here's my code.
What's wrong with this:
print"<table border='1' width='80%'>";
$sql="SELECT hotelName, details, phone, address, link
FROM accommodations
WHERE orgID='$orgID'";
$result = mysql($dbName, $sql);
while($row=mysql_fetch_row($result)){
$hotelName=$row[0];
$details=$row[1];
$phone=$row[2];
$address=$row[3];
$link=$row[4];
print"<center><font size='5'><b>$hotelName</b></font></center><br>";
print"<center>$details</center><br>";
print"<center><b>Phone:</b><br>$phone</center><br>";
print"<center><b>Address:</b><br>$address</center><br>";
print"<center><b>More Info:</b><br><a href=\"$link\"><u>$link</u></a></center><br></td></tr><tr></tr>";
print"</td></tr>";
}
print"</table>";
Can anyone see the problem. Thanks for your time.