10 lines
262 B
PHP
10 lines
262 B
PHP
<?php
|
|
include 'koneksi.php';
|
|
$result = mysqli_query($conn, "SELECT * FROM jalan_rusak ORDER BY created_at DESC");
|
|
$data = [];
|
|
while ($row = mysqli_fetch_assoc($result)) {
|
|
$data[] = $row;
|
|
}
|
|
header('Content-Type: application/json');
|
|
echo json_encode($data);
|
|
?>
|