Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
任何人都知道为什么下面的代码不起作用
if($out['out'] = '$user')
我不确定如何if在 mysql 字段上进行声明。
if
谢谢
因为您不能在单个 quatation 字符串中使用变量值,所以使用 ==
将 ' = ' 替换为 ' == ' 并删除$user周围的单引号:
if($out['out'] == $user)