L'ho fatto in fretta, magari c'è un modo per ridurlo :master:Codice PHP:
<?php
$num=3; //numero colonne
$array=array(1,2,3,4,5,6,7);
$lunghezza=sizeof($array);
echo "<table>";
$x=0;
while($x<$lunghezza){
echo "<tr>";
for($i=0;$i<$num;$i++){
if($x<$lunghezza){
echo "<td>".$array[$x]."</td>";}
if($x<$lunghezza){
$x++;}
}
echo "</tr>";
}
echo "</table>";
?>