add files

This commit is contained in:
luthfihadinugroho79
2026-06-10 19:42:59 +07:00
parent 7bf3c98e59
commit e950468760
3541 changed files with 0 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
<?php
include 'koneksi.php';
header('Content-Type: application/json; charset=utf-8');
$query = mysqli_query($koneksi, "SELECT id, nama_spbu, no_wa, status_24_jam, lat, lng FROM `$nama_tabel`");
$data = [];
while ($row = mysqli_fetch_assoc($query)) {
$row['lat'] = floatval($row['lat']);
$row['lng'] = floatval($row['lng']);
$data[] = $row;
}
echo json_encode($data);
?>