You need to iterate through the result set returned by MySQL. That means calling mysqli_fetch_array()
for each row of that result set. You can do that using a while
loop:
while($row = mysqli_fetch_assoc($result)) {
$rows[] = array("name" => $row['name'],
"city" => $row['bill_city'],
"code" => $row['bill_code'],
"country" => $row['bill_country'],
"street" => $row['bill_street'],
"latitude" => $row['latitude'],
"longitude" => $row['longitude'],
"type" => $row['setype']);
}
}