$counter = "";
if($sWall>1){
$counter = $counter + $sWall;
}
if($sWC>1){
$counter = $counter + $sWC;
}
if($sOther>1){
$counter = $counter + $sOther;
}
if(!(empty($counter))){
echo "(".$counter.") ";
}
這就是我所沒有的。 $sOther
,$sWC
,$sWall
是mysql_num_rows
。如果你有$sOther
中的1,$sWC
中的1和$sWall
中的1,我希望回顯出來,例如(3)。設置變量和計數
我該怎麼做,我所做的只是我嘗試過的。
它是如何「不工作」?錯誤? (如果是這樣,請將其編輯到問題中)意外的輸出? (如果是這樣,請告訴我們是什麼。) – GreenMatt 2010-10-28 19:54:53