我想在php 5中使用和OR語句,但它只是不工作,這個腳本有什麼問題。這是假設發射的錯誤,但它沒有。如果我刪除「||」(我認爲是OR語句),它會引發錯誤。php 5 OR語句
if($winner=="2" && $fteamscore>$steamscore){
$return['error'] = true;
$return['msg'] = 'Wrong Score, You said you LOST but you are reporting that you WON.';
}
if($winner=="3" && $fteamscore>$steamscore){
$return['error'] = true;
$return['msg'] = 'Wrong Score, You said you WON but your are reporting that your OPPONENT won.';
}
if($fteamscore<$steamscore && $winner=="3" || $winner=="2"){
您的回答最好。謝謝 – 2010-07-15 16:23:01