while遍历结果集解决思路

while遍历结果集for遍历。$nummysql_num_rows($result)for($i0$i$num$i++){$rowmysql_fetch_assoc($

while遍历结果集
for遍历。

$num=mysql_num_rows($result);
for($i=0;$i<$num;$i++)
{
    $row=mysql_fetch_assoc($result);
    $arr[]=$row;
}


while的条件怎么填- -。 貌似我好像见过。貌似忘了。
[解决办法]
while($row=mysql_fetch_assoc($result)){
  $arr[]=$row;
}