<? PHP
$a=array (1,2,3,4,5,6,7,8,9,10,11);
$I=0;
? >
<The table border=1 >
<Tr>
<?
foreach ($a as $k) {
if ($I % 3==0) {//it says to the column number of the transverse alignment.
echo "</tr> <tr>" ;
}
echo <td> "" , $k, </td> "" ;//it is shown that the columns of data.
$I + +;
}
? >
</tr>
</table>

you might be interested in the article:

  • read from the database record aligned


This concludes the body part