PHP code for traversing data table data and arranging the list horizontally_PHP tutorial

WBOY
Release: 2016-07-21 15:44:32
Original
879 people have browsed it

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 "";//The data of this column is displayed here.
$i ++;
}
?>

",$k,"

www.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...
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template