convert query result to array php

Solutions on MaxInterview for convert query result to array php by the best coders in the world

showing results for - "convert query result to array php"
Rashan
01 Jan 2018
1$result = "select * from random_table where id = 1";
2
3$rows = [];
4while($row = mysqli_fetch_array($result))
5{
6    $rows[] = $row;
7}