I assume you know how to get the records and stuff, but you have problems displaying the 4x10 table, right?
If so, then it's simple: Make a counter to count the number of fields currently displayed. If the count is a multiple of 4, then the next record should go in the next line, right?
So the code would look something like this:
$count = mysql_num_rows($result);
print "<table><tr>";
for ($i=1; $i<=$count; $i++) {
$row = mysql_fetch_array($result);
print "<td>" . $row[0] . "</td>";
if ($i % 4 == 0) print "</tr><tr>";
}
print "</tr></table>";
Diego