0) { while ($row = mysqli_fetch_assoc($result)) { //extract($row); $data = $row; } } echo json_encode($data); ?>