可能有人请帮我用下面的代码正确使用语法平等的
if ($scope = '9001') $docref = $rs["9001ref"];
elseif ($scope = '14001') $docref = $rs["14001ref"];
elseif ($scope = '18001') $docref = $rs["18001ref"];
elseif ($scope = '9001,14001') $docref = $rs["914001ref"];
elseif ($scope = '9001,18001') $docref = $rs["918001ref"];
elseif ($scope = '14001,18001') $docref = $rs["1418001ref"];
elseif ($scope = '9001,14001,18001') $docref = $rs["91418001ref"];
我不确定我是否应该使用=或==
,也不能确定我是否应该使用“”或“”
有人请让我知道,并提供一个简短的解释,所以我知道前进,谢谢。
http://php.net/manual/en/language.operators.comparison。 php – 2014-10-07 07:52:13
这里没有很多mysql在这里 – Strawberry 2014-10-07 07:53:08
RTFM:'='是赋值运算符,'=='用于宽松比较,'==='是类型和值检查 – 2014-10-07 07:59:49