Home >Backend Development >PHP Tutorial >mysql_fetch_array警告的问题

mysql_fetch_array警告的问题

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-23 14:16:24849browse

MySQL PHP

while($rows = mysql_fetch_array($request))

为什么每次写这个都给警告?
while(($rows = mysql_fetch_array($request))!=false)

这样写就好了,有什么区别呢

回复讨论(解决方案)

你说的这个警告应该是在IDE环境下提醒的吧,IDE认为这是一种意外赋值,其实是没有问题的

$rows = mysql_fetch_array($request)
返回值是array
($rows = mysql_fetch_array($request))!=false
返回值是bool

告警是正常的吧

警告是什么??

while(($rows = mysql_fetch_array($request)))

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