PHP array only showing last sql result -
hello hoping can me, when use print_r last result mysqli query, code below.
//fetch data sql results while($row = $rs->fetch_assoc()){ //put results in array $page_query=array($row['name']=>$row['system']); } }
you overwriting $page_query
everytime in loop, change to:
while($row = $rs->fetch_assoc()){ //put results in array $page_query[] =array($row['name']=>$row['system']); }
Comments
Post a Comment