Home > Backend Development > PHP Tutorial > mysql_fetch_array可以这样写吗?

mysql_fetch_array可以这样写吗?

WBOY
Release: 2016-06-23 14:25:55
Original
714 people have browsed it

while($row=mysql_fetch_array($result))可以写成

while(mysql_fetch_array($result)=true)


$row=mysql_fetch_array($result)
读取$row




回复讨论(解决方案)

为何要多此一举?

当你需要隔行读取的时候可以这样写
但 while(mysql_fetch_array($result)=true)
应写作 while(mysql_fetch_array($result)==true)
或 while(mysql_fetch_array($result))

脱裤子放屁,不是多此一举?

为什么这样就隔行了,我试了下确实隔行了

mysql_fetch_array 读取当前记录,并使记录指针指向下一条记录

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