<?php
include '../../conn.php';

$doctorid=$_GET['doctorid'];

$resultdata =$con->query("select * from `feedback` where doctorId=$doctorid ");
   while($row=mysqli_fetch_array($resultdata))
    {
        $review=array();
        $userid=$row['userId'];
        $resultdata =$con->query("select * from `users` where id=$userid ");
   while($row=mysqli_fetch_array($resultdata))
    {
        $review[]=$row;
    }
}
if($review > 0){
    
$j->status  = "101";
$j->message = "Success";
$j->review=$review;

}
else{
$j->status  = "104";
$j->message = "Failed";
}

echo json_encode($j); 
?>