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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.