< ? 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...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn