php select query into array variable code example
Example: convert query result to array php
$result = "select * from random_table where id = 1";
$rows = [];
while($row = mysqli_fetch_array($result))
{
$rows[] = $row;
}
$result = "select * from random_table where id = 1";
$rows = [];
while($row = mysqli_fetch_array($result))
{
$rows[] = $row;
}