<?php
include 'koneksi.php'; 

$query = mysqli_query($koneksi, "SELECT id, nama_spbu, no_wa, status_24_jam, lat, lng FROM $nama_tabel");
$data = array();

while($row = mysqli_fetch_assoc($query)){
    $data[] = $row;
}
echo json_encode($data);
?>