在循环外加:$color="#eeeeee";
在循环内加:
$t->set_var("COLOR",$color);
if($COLOR=="#eeeeee") $bg="#ffffff";
else $bg="#eeeeee";
在循环内加:
$t->set_var("COLOR",$color);
if($COLOR=="#eeeeee") $bg="#ffffff";
else $bg="#eeeeee";
在循环外加:$color="#eeeeee";
在循环内加:
$t->set_var("COLOR",$color);
if($color=="#eeeeee") $color="#ffffff";
else $color="#eeeeee";
if($color=="#eeeeee"){
$color="#ffffff";
}else{
$color="#eeeeee";
}
这一句放到循环里就OK了