我试图做的是在我的 sql 查询之前设置正确的变量。这是我创建的 if 语句,但是我无法让它正确回显。下面提供的设置应该回显 fnm 但正在回显 nm。我在这里做错了什么以使每个 if 语句中的两个变量都匹配,以便我可以插入正确的数据
$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;