prova così:
utilizza $limite per impostare quanti elementi presenti in ogni colonna.
codice:
<?
$cats = @mysql_query('SELECT id, nome FROM categorie');
if (!$cats) {
exit('
Errore nel reperire informazioni dal database!
' .
'Error: ' . mysql_error() . '</p>');
}
$limite=3;
$cont=0;
echo "<table border=0>";
echo "<tr>";
while ($categoria = mysql_fetch_array($cats))
{
$id = $categoria['id'];
$nome = htmlspecialchars($categoria['nome']);
if ($cont==$limite)
{
echo "</td>";
$cont=0;
}
if ($cont==0)
{
echo "<td valign=\"top\">";
}
echo "[*]$nome";
$cont++;
}
if ($cont > 0)
echo "</td>";
else
echo "<td></td>";
echo "</tr>";
echo "</table>";
?>