Jump to content

[SOLVED] table / mysql_fetch_array


jakebur01

Recommended Posts

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>";
  

  
   }

Link to comment
https://forums.phpfreaks.com/topic/48543-solved-table-mysql_fetch_array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.