xxxxxxxxxx
<?php
$queryString = "foo=bar&baz=qux&alice=bob";
// Using parse_str() function to convert query string to an array
parse_str($queryString, $array);
print_r($array);
?>
xxxxxxxxxx
$result = "select * from random_table where id = 1";
$rows = [];
while($row = mysqli_fetch_array($result))
{
$rows[] = $row;
}