以下代码在第二个 elseif 语句中返回语法错误:
if(($Rec["gradyear"] = $mydate[year] && $mydate[month] IN ("January","February","March","April","June","July")) || ($Rec["gradyear"] = $mydate[year] -1 && $mydate[month] IN ("August","September","October","November","December"))) {
$bgcolor="#00FF00";
} elseif(($Rec["gradyear"] = $mydate[year] -1 && $mydate[month] IN ("January","February","March","April","June","July")) || ($Rec["gradyear"] = $mydate[year] -2 && $mydate[month] IN ("August","September","October","November","December"))) {
$bgcolor="#FFFF00";
} elseif(($Rec["gradyear"] = $mydate[year] -2 && $mydate[month] IN ("January","February","March","April","June","July")) || ($Rec["gradyear"] = $mydate[year] -3 && $mydate[month] IN ("August","September","October","November","December"))) {
$bgcolor="#FF0000"; $fontcolor="#FFFFFF";
}
为了我的一生,我找不到它。任何帮助将不胜感激。
另外,如果我没有提供足够的信息,我提前道歉。这是我第一次在这里发帖,所以请温柔。:)