哪位高手能给小弟我详细解释一下这句话的意思

WBOY
Release: 2016-06-13 12:15:44
Original
879 people have browsed it

谁能给我详细解释一下这句话的意思
while($row=mysql_fetch_assoc($result)):

求详细解释
------解决思路----------------------
1.while(condition)  {dosomething();} condition = true时dosomething()一直执行,否则跳出循环.
2.$row=mysql_fetch_assoc($result) 赋值,没有更多行时返回false

综上,在数据库没有数据之前会一直执行dosomething();的内容.

另外,貌似现在php已经不推荐用mysql_fetch_assoc()这个函数了可以考虑试用mysqli或者pdo替换
------解决思路----------------------

引用:
mysql_fetch_assoc 这个函数是什么意思?


官方手册是最好的教程。
http://php.net/manual/zh/function.mysql-fetch-assoc.php
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