WHERE is the errormessage? <-- !!
Your app gets the echo output. So it must be your app which must be able to read the json from your server.
You are NOT giving any useful information to us to help you.
when i am using following code
if ($result->num_rows > 0) {
// output data of each row
$rows = array();
while($r = $result->fetch_assoc()) {
$rows[] = $r;
}
} else {
echo "0 results";
}
$res = jason_encode($rows);
echo $res;
$result->close();
$conn->close();
?>
i am getting following error on running it in the browser
Connected to the database.
Fatal error: Uncaught Error: Call to undefined function jason_encode() in /srv/disk20/3373050/www/saeedhassan.atwebpages.com/r.php:24 Stack trace: #0 {main} thrown in
/srv/disk20/3373050/www/saeedhassan.atwebpages.com/r.php on line
24
$res = jason_encode($rows); is on line 24