<?
  $sql="select * from live_ys where fenlei=1 order by id desc limit 0,9 ";
  $rs=$db->query($sql);
  while($arr=$db->nr($rs)){
 ?>
<table width="100%" border="2" cellspacing="0" cellpadding="0">
   <tr>
     <td height="15">
        <a class="a2" href="?pid=<?=$arr["address"]?>"><?=$arr["title"]?></a>
      </td>
</table>
<?
 }
?>
为什么我循环的数据中间有间隔为什么不是连续的呢》

解决方案 »

  1.   

    HTML表单的问题吧  $sql="select * from live_ys where fenlei=1 order by id desc limit 0,9 "; 
      $rs=$db->query($sql); 
    ?>
    <table width="100%" border="2" cellspacing="0" cellpadding="0"> 
    <?
      while($arr=$db->nr($rs)){ 
    ?> 
      <tr> 
        <td height="15"> 
            <a class="a2" href="?pid= <?=$arr["address"]?>"> <?=$arr["title"]?> </a> 
          </td> 
    </tr>
    <? 

    ?>
    </table>