Home >Backend Development >PHP Tutorial >php读取数据,如何判断读取的内容,

php读取数据,如何判断读取的内容,

WBOY
WBOYOriginal
2016-06-23 13:48:08831browse

php读取数据,如何判断读取的内容,

想判断第4行如果是0,输出为自动,如果不是,输出为手动,但我下面的代码无论是0还是1都显示手动,应该是判断出了问题,应该怎么修改


if($row[4]="0")
{
$leixing="自动";
}
else
{
$leixing="手动";
}
?>


回复讨论(解决方案)

if($row[4] =="0")

= 是赋值
== 才是比较

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn