Files
2026-06-11 21:14:16 +07:00

18 lines
314 B
PHP

<?php
include 'koneksi.php';
header('Content-Type: application/json; charset=utf-8');
$query = "SELECT * FROM jalan ORDER BY id DESC";
$result = mysqli_query($conn, $query);
$data = [];
if ($result) {
while ($row = mysqli_fetch_assoc($result)) {
$data[] = $row;
}
}
echo json_encode($data);
?>