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

WBOY
Release: 2016-06-23 13:48:08
Original
799 people have browsed it

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

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


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


回复讨论(解决方案)

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

= 是赋值
== 才是比较

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template