<?php $strhead=""?><?php do { ?> <table width="260" border="0" cellpadding="0" cellspacing="0"> <tr> <td> <? if ($strhead<>$row_xy_news['typename']) {?><table width="260" height="25" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#666666"> <tbody> <tr class="SHI1"> <td width="273" valign="center" bgcolor="#ffffec" class="xu1"><strong><font color="#000000">[</font><font color="#000000"><?php echo $row_xy_news['typename']; ?>]<a class="bt_more" href="http://comic.hangzhou.com.cn/hzwdmhd/index.htm" target="_blank"></a></font></strong></td> </tr> </tbody> </table> <?php }?> <table width="260" border="0" align="center" cellpadding="0" cellspacing="4"> <tr> <td><span class="xu1"><span class="bt_head">·</span><?php echo $row_xy_news['title']; ?> </span></td> <?php $strhead=$row_xy_news['typename'] ?> </tr> </table></td> </tr> </table> <?php } while ($row_xy_news = mysql_fetch_assoc($xy_news)); ?>
我想把那表按每行2个的显示排列 我试过把重复语句拖到<tr></tr>里,加一个变量,记录重复次数,每重复一次,输出一个<tr> 但这种我发觉只能用于没有用嵌套的,如果用了嵌套就出现错误了 老大,可以帮忙解决下吗?
|