I have found this code on the internet but cant think how to adapt it to do 3 columns or more any ideas:
$count = 1;
$column = 1;
//db connect and select
$result=mysql_query ("select * from players WHERE category='$category'");
while ($myrow = mysql_fetch_array ($result))
{
if ($column == 1)
{
printf("<tr><td width=250>%s</td>",$myrow[playername]);
}
else
{
printf("<td width=250>%s</td></tr>",$myrow[playername]);
}
$count += 1;
$column = $count % 2;
}