Home > Backend Development > PHP Tutorial > 为什么php这样写会死循环

为什么php这样写会死循环

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-02 11:34:49
Original
1803 people have browsed it

php

$sql="select * from user";
$res=mysql_query($sql);
$row=mysql_fetch_row($res);
while($row) {
echo 'A row';
}
以上代码会死循环而下面的正常
$sql="select * from user";
$res=mysql_query($sql);

while($row=mysql_fetch_row($res)) {
echo 'A row';
}
为什么第一种会死循环呢

Related labels:
php
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
Latest Issues
php data acquisition?
From 1970-01-01 08:00:00
0
0
0
PHP extension intl
From 1970-01-01 08:00:00
0
0
0
How to learn php well
From 1970-01-01 08:00:00
0
0
0
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template