Código PHP:
<?php
define( "NUM_ROW", 4 );
print "<table>";
$i = 0;
while( $row = mysql_fetch_array( $result ) )
{
print "<td>" . $row['valor'] . "</td>";
$i++;
if( $i % NUM_ROW == 0 )
print "</tr><tr>";
}
print "</table>"
?>
Espero esto te sirva y sea lo que buscabas, la constante NUM_ROW es el numero de columnas que tendras.