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缺少我 –