<?php

header('Content-Type: application/json');

include '../config/koneksi.php';

$query = mysqli_query(
    $conn,
    "SELECT * FROM parsil_tanah"
);

$data = [];

while($row = mysqli_fetch_assoc($query)){

    $data[] = $row;

}

echo json_encode($data);