0) { while ($row = mysqli_fetch_assoc($result)) { //extract($row); $data[] = $row; } } else { $data['status'] = 200; $data['message'] = "Data not found!"; } // echo $data; echo json_encode($data); ?>