我有这个代码:
while($m = $movieResult->fetch_array(MYSQLI_ASSOC)){
// stuff happens here
}
return $stuff;
它有效,但我真正需要的是检测 while 循环何时不像此示例那样运行,而是通过 while 循环的多次迭代:
if($m = $movieResult->fetch_array(MYSQLI_ASSOC)){
// stuff happens here
return $stuff;
}
else{
return false;
}