jakebur01 Posted April 25, 2007 Share Posted April 25, 2007 I can't keep my columns at a fixed width. About every five rows that are returned the last couple of columns will scrunch in. How do I keep everything perfectly aligned? foreach ($zips as $key => $value) { "Zip code <b>$key</b> is <b>$value</b> miles away from <b>$formzip</b>.<br />"; echo "<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=5>"; $result = mysql_query("SELECT * FROM smithssc WHERE Zip = '$key' AND $productselect = 1", $db) or die(mysql_error()); while($myrow = mysql_fetch_array ($result)) { //<img src='../Images/globe.gif'/> echo"<tr><TD WIDTH=154><bold><small>"; echo$myrow["Dealer"]; echo"</small></bold></td><TD WIDTH=117><small>"; echo$myrow["Address"]; echo"</small></td><TD WIDTH=50 ALIGN = right><small>"; echo$myrow["City"]; echo ", "; echo"</small></td><TD WIDTH=20><small>"; echo$myrow["State"]; echo"</small></td><TD WIDTH=30><small>"; echo$myrow["Zip"]; echo"</small><td>"; //echo "Zip code <b>$key</b> is <b>$value</b> miles away from <b>97214</b>.<br />"; //echo " This Dealer is <b>$value</b> miles away from <b>97214</>.<br />"; echo"</td></tr>"; } echo "</table>"; } Quote Link to comment https://forums.phpfreaks.com/topic/48543-solved-table-mysql_fetch_array/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.