你把下面这段写到<? ?>里面。
好象 $re->name 出了<? ?>应该会失效!
<tr>
<td width="25%"><?php echo $re->name; ?></td>
<td width="25%"><?php echo $re->yhzh; ?></td>
<td width="25%"><?php echo $re->bumen; ?></td>
<td width="25%"><?php echo $re->sf; ?></td>
</tr>
好象 $re->name 出了<? ?>应该会失效!
<tr>
<td width="25%"><?php echo $re->name; ?></td>
<td width="25%"><?php echo $re->yhzh; ?></td>
<td width="25%"><?php echo $re->bumen; ?></td>
<td width="25%"><?php echo $re->sf; ?></td>
</tr>
for ($i=0;$i<$count;$i++)
{
$re=mssql_fetch_object($rs);
?>
<tr>
<td width="25%"><?php echo $re->name; ?></td>
<td width="25%"><?php echo $re->yhzh; ?></td>
<td width="25%"><?php echo $re->bumen; ?></td>
<td width="25%"><?php echo $re->sf; ?></td>
</tr>
<?php
}
$db_close=mssql_close($comm);
?>
###########将上面的程序改为下面的#######################
<?php
for ($i=0;$i<$count;$i++){
$re=mssql_fetch_object($rs); printf("
<tr>
<td width=\"25%%\">$re->name</td>
<td width=\"25%%\">$re->yhzh</td>
<td width=\"25%%\">$re->bumen</td>
<td width=\"25%%\">$re->sf</td>
</tr>");
}//endfor
$db_close=mssql_close($comm);
?>
for ($i=0;$i<$count;$i++)
{
$re=mssql_fetch_object($rs);
echo "<tr><td width='25%'>".$re->name."</td>";
echo "<td width='25%'>.$re->yhzh."</td>";
echo "<td width='25%'>.$re->bumen."</td>";
echo "<td width='25%'>.$re->sf."</td></tr>"
}
$db_close=mssql_close($comm);
?>
这样ok了吗?