Nested while loop runs only once

后端 未结 2 1223

Nested \"while\" loop runs only one time, only one div is displayed, can\'t find any mistakes, 0 errors in \"error_log

2条回答
  •  半阙折子戏
    2021-01-26 13:05

    Looks like your outermost while is only fetching one record

     while ($row = mysqli_fetch_array($sqlresult)) {
     . . . . 
    }
    

    Get rid of the outermost while if you only fetch one record...

    $row = mysqli_fetch_array($sqlresult);// remove closing } too 
    

提交回复
热议问题