我正在尝试使用&#34来回显数据库中的值;如果"但回声重复。
<?php
include ('config2.php');
$result = mysql_query("select * from accounts");
while($row = mysql_fetch_array($result)) {
$banned = $row['banned'];
$banned_by = $row['banned_by'];
$banned_reason = $row['banned_reason'];
If ($banned = 10)
echo "Banned";
else {
echo "Active";
}
}
?>
答案 0 :(得分:3)
你的代码错了。试试
if($banned == 10)