View Single Post
  #4 (permalink)  
Old 2005-12-19, 11:53 AM
neriksmoen neriksmoen is offline
Junior Member
 
Join Date: Dec 2005
Posts: 1
neriksmoen
Default

you would probably want to do something such as:

Code:
$query = @mysql_query("SELECT * FROM yourtable");
echo "<table border=1 cellpadding=0 cellspacing=0>";
echo " <tr>";
$thenum = 1;
while($result = @mysql_fetch_array($query))
{
  if($thenum > 4){ $thenum=1; echo "</tr><tr>"; }
  else{ $thenum++; }
  echo "<td>$result[thefield]</td>";
}
echo " </tr>";
echo "</table>";
which is similar to what himakumar was suggesting code-wise, and using the database that hakperest suggested.
Reply With Quote