就象这个页面怎么一道浅色,一道深色阿! for ($i=0;$i<20;$i++) print ($i % 2) ? "深色" : "浅色"; 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 static $flag=0;if($flag==0) {echo "<img src=\"red.gif\">";$flag=1;}else if($flag==1) {echo "<img src=\"blue.gif\">";$flag=0;} <?$arr=array('a','b','c','d','e','f');echo "<table border=1 width=200>";for($n=0;$n<count($arr);$n++){ if($n%2){ echo "<tr style='background:#ff0000;'><td>".$arr[$n]."</td></tr>"; }else{ echo "<tr style='background:#00ff00;'><td>".$arr[$n]."</td></tr>"; }}echo "</table>";?> 看看我的:)<table width="90%" border="0" bordercolor="#99CCFF"><?//display the news titles and others $rdc = true; while($aRow = mssql_fetch_array($r)){ if($idc){$rowColor = $color1;} else $rowColor = $color2; $idc=!$idc;?> <tr bgcolor = "<?=$rowColor?>""> <td width="65%" height="30"><? echo "<a href = './news/" . $aRow["news_id"] . ".php" . "' class = 'newslist'>" . $aRow["title"] . "</a>";?> </td> <td width="14%" height="30" align="center"><? echo $aRow["author_name"];?> </td> <td width="13%" height="30" align="center"><? echo $aRow["times"];?> </td> <td width="8%" height="30" align="center"><? echo "<a href = delet.php?id=" . $aRow["news_id"] . "><font color = '#ff0000'>删 除</font></a>";?> </td> </tr><? }//end the "while" loop?></table> 看看我的:)<table width="90%" border="0" bordercolor="#99CCFF"><?//display the news titles and others $rdc = true; while($aRow = mssql_fetch_array($r)){ if($idc){$rowColor = $color1;} else $rowColor = $color2; $idc=!$idc;?> <tr bgcolor = "<?=$rowColor?>""> <td width="65%" height="30"><? echo "<a href = './news/" . $aRow["news_id"] . ".php" . "' class = 'newslist'>" . $aRow["title"] . "</a>";?> </td> <td width="14%" height="30" align="center"><? echo $aRow["author_name"];?> </td> <td width="13%" height="30" align="center"><? echo $aRow["times"];?> </td> <td width="8%" height="30" align="center"><? echo "<a href = delet.php?id=" . $aRow["news_id"] . "><font color = '#ff0000'>删 除</font></a>";?> </td> </tr><? }//end the "while" loop?></table> 数据库复制问题 pear 安装完了怎么使用啊 邮件系统怎么修改 寻求CSDN有创意的兄弟,100全送给你!!!!! 用过Discuz!大虾们帮帮忙 架设服务器的问题 关于字符处理的问题,请大家帮忙! 有谁知道whois怎么作?包括中文余名的?公司急用,如果知道,重重有赏!tome:[email protected] 求助:如何打包自己开发的模块 关于php glob函数无法遍历带中文路径 错在那里,为什么不正确执行,那个条件不满足? 我有很多的问题啊!
{echo "<img src=\"red.gif\">";$flag=1;}
else if($flag==1)
{echo "<img src=\"blue.gif\">";$flag=0;}
$arr=array('a','b','c','d','e','f');
echo "<table border=1 width=200>";
for($n=0;$n<count($arr);$n++){
if($n%2){
echo "<tr style='background:#ff0000;'><td>".$arr[$n]."</td></tr>";
}else{
echo "<tr style='background:#00ff00;'><td>".$arr[$n]."</td></tr>";
}
}
echo "</table>";
?>
<table width="90%" border="0" bordercolor="#99CCFF">
<?
//display the news titles and others
$rdc = true;
while($aRow = mssql_fetch_array($r)){
if($idc){$rowColor = $color1;}
else $rowColor = $color2;
$idc=!$idc;
?>
<tr bgcolor = "<?=$rowColor?>"">
<td width="65%" height="30">
<?
echo "<a href = './news/" . $aRow["news_id"] . ".php" . "' class = 'newslist'>" . $aRow["title"] . "</a>";
?>
</td>
<td width="14%" height="30" align="center">
<?
echo $aRow["author_name"];
?>
</td>
<td width="13%" height="30" align="center">
<?
echo $aRow["times"];
?>
</td>
<td width="8%" height="30" align="center">
<?
echo "<a href = delet.php?id=" . $aRow["news_id"] . "><font color = '#ff0000'>删 除</font></a>";
?>
</td>
</tr>
<?
}//end the "while" loop
?>
</table>
<table width="90%" border="0" bordercolor="#99CCFF">
<?
//display the news titles and others
$rdc = true;
while($aRow = mssql_fetch_array($r)){
if($idc){$rowColor = $color1;}
else $rowColor = $color2;
$idc=!$idc;
?>
<tr bgcolor = "<?=$rowColor?>"">
<td width="65%" height="30">
<?
echo "<a href = './news/" . $aRow["news_id"] . ".php" . "' class = 'newslist'>" . $aRow["title"] . "</a>";
?>
</td>
<td width="14%" height="30" align="center">
<?
echo $aRow["author_name"];
?>
</td>
<td width="13%" height="30" align="center">
<?
echo $aRow["times"];
?>
</td>
<td width="8%" height="30" align="center">
<?
echo "<a href = delet.php?id=" . $aRow["news_id"] . "><font color = '#ff0000'>删 除</font></a>";
?>
</td>
</tr>
<?
}//end the "while" loop
?>
</table>