php自动分行

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gbk" />
<title>修改商品页面</title>
<style type="text/css">
 table{
 	width: 980px;
 	border:#000 solid 1px;
 	margin: auto;
 }
 td{
 	border:#000 solid 1px;
 }
</style>
</head>
<body>
<table>
    <tr>
        <?php 
          for ($i=1;$i<=100;$i++){
              echo '<td><img  src="images/'.$i.'.jpg"></td>';
              if($i%10==0){
                  echo '</tr><tr>';
              }
          }
        
        ?>
    </tr>
</table>
</body>
</html>
发布了70 篇原创文章 · 获赞 1 · 访问量 497

猜你喜欢

转载自blog.csdn.net/zhupengqq1/article/details/103943426