Konversi hasil kueri menjadi array php

$result = "select * from random_table where id = 1";

$rows = [];
while($row = mysqli_fetch_array($result))
{
    $rows[] = $row;
}
Cautious Capuchin