<?
require("include/config.php");
$sql="select * from news order by dtime desc"; 
$result=mysql_query($sql);
$nums=mysql_num_rows($result);
//$myrow=mysql_fetch_array($result); // 这句删去
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
</head><body>
<table width="100%" border="1" cellpadding="1">
  <? 
  for($i=0;$i<$nums;$i++) // 是$i<$nums不是$i<=$nums
   {
   ?>
  <tr> 
    <td>新闻标题</td>
  </tr>
  <tr> 
    <td><? print $myrow["title"];?></td>
  </tr>
  <?
  }
  ?>
</table>
</body>
</html>