21,886
社区成员
发帖
与我相关
我的任务
分享
$i = 0;
while($i < $rows){ //外面的while 循环
?>
<div class="line" id="product">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<?
$list = tep_db_query($sql);
$j = 0;
while($list_set = tep_db_fetch_array($list)) { //从数据库里面读取数据然后显示到表格里面(内循环)
$sptp = $list_set['sptp'];
$lpmc = $list_set['lpmc'];
?>
<td align="center">
<div class="pbox">
<a href="#"><img src=" <?=$sptp?>" alt="" width="96" height="97" border="0" class="img"></a>
<p class="name"><a href="#"><?=$lpmc?></a></p>
<p class="padbottom"> <strong class="jg">25 </strong>积分+ <strong>100元 </strong> </p>
<a href="#"><img src="images/btn_sc.gif" width="55" height="22" border="0"></a>
</div>
</td>
<?
$j ++;
if(($j - 1) != 0 && ($i - 1) % 5 == 0) {
echo '</tr><tr>';
}
}
?>
</tr>
</table>
</div>
<div class="line" id="product"></div>
<?
$i ++;
}