0
什麼,我試圖做我的SQL查詢之前設置正確的變量。這是我創建的if語句,但我無法正確回顯。下面提供的設置應該回顯出fnm,但是會回顯nm。我在做什麼錯誤這裏有兩個變量匹配每個if語句,所以我可以插入正確的數據如果有多個條件else語句
$type = "No Notification";
$remote = "Yes";
if ($type == "No Notification" && $remote == "No"){
$type = "nm";
}
elseif ($type == "Email Notification" && $remote == "No"){
$type = "m";
}
elseif ($type == "No Notifcation" && $remote == "Yes"){
$type = "fnm";
}
elseif ($type == "Email Notification" && $remote == "Yes"){
$type = "fm";
}
else {
$type = "nm";
}
echo $type;
什麼'的var_dump($型); var_dump($ remote);'display? (在你的代碼的開頭添加行) – Jocelyn
字符串(2)「納米」串(3)「是」 –
錯字:** ** Notifcation缺少我 –