<?php $db= new mysqli('localhost','root','6202','goodsmm'); $query="select * from menu";//从表menu中查询 $result=$db->query($query);//执行查询语句 $rows_result=$result->num_rows//统计查询到的行数 ?> 现在查询结果就在$result中,请问如何把查询结果以数组的形式存入呢?会的麻烦把代码补充一下,谢谢 $result_array=array(); while($rows=$result->fetch_array()){ array_push($result_array,$rows); }