两个dd写一样的循环代码,其中一个不被执行是吗?
两个dd写一样的循环代码,其中一个dd显示为空白
$ztzs=$dbc->prepare("select * from naszt where 1=1 and zttype='威联通'");
$ztzs->execute();
<dd>
<?php while($row=$ztzs->fetch()){?>
<div class="ztzs">
<a href="ztselect.php?id=<?php echo $row["id"]?>" target="_blank">
<img src="ztImg/<?php echo $row["headimg"] ?>">
</a>
<p><?php echo $row['ztname'] ?></p>
</div>
<?php } ?>
</dd>
<dd>
<?php while($row=$ztzs->fetch()){?>
<div class="ztzs">
<a href="ztselect.php?id=<?php echo $row["id"]?>" target="_blank">
<img src="ztImg/<?php echo $row["headimg"] ?>">
</a>
<p><?php echo $row['ztname'] ?></p>
</div>
<?php } ?>
</dd>