Copy code The code is as follows:
$a = array (1,2,3,4,5 ,6,7,8,9,10,11);
$i = 0;
?>
< ?
foreach ($a as $k){
if($i%3==0) {//This indicates the number of columns that need to be arranged horizontally.
echo "
< ;tr>";
}
echo "",$k," | ";//The data of this column is displayed here.
$i ++;
}
?>
http://www.bkjia.com/PHPjc/320509.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/320509.htmlTechArticleCopy the code as follows: ?php $a = array (1,2,3,4,5,6, 7,8,9,10,11); $i = 0; ? table border=1 tr ? foreach ($a as $k){ if($i%3==0) {//This indicates that horizontal orientation is required Number of columns to arrange. echo...