<?php 

require 'db.php';

$sels = $con->query("select * from feedback");
while($rows = $sels->fetch_assoc())
{
    $cat =  $con->query("select name,mobile from user where id=".$rows['uid']);
	if($row = $cat->fetch_assoc())
	{
	    $p['name'] = $row['name'];
        $p['mobile'] = $row['mobile'];
	}
	$p['rate'] = $rows['rate'];
	$p['message'] = $rows['msg'];
	$cp[] = $p;
}

echo json_encode($cp);
?>