<?php 
include '../koneksi.php';
$id = $_POST['id'];              
$data = mysqli_query($koneksi, "select * from anggota where angg_id='$id'");
$d = mysqli_fetch_assoc($data);

$id2 = $d['angg_id'];
$noang = $d['angg_no'];
$nama = $d['nama'];
$alamate = $d['alamat'];
$rt = $d['rt'];
$rw = $d['rw'];

$alamat=$alamate.' RT '.$rt.' RW '.$rw ;

$returnArr = [$id2,$noang,$nama,$alamat];    
echo json_encode($returnArr);
?>