I need to fetch long text type data from mysql server for Android application. It is showing NULL after encoding in JSON. Code is given below.
<?php
require_once('dbConnect.php');
$sql = "select tips from health_tips order by number";
$res = mysqli_query($con, $sql);
$result = array();
while ($row = mysqli_fetch_array($res))
{
array_push($result, array('url' => $row['tips']));
}
echo json_encode(array("result" => $result));
mysqli_close($con);
How to solve this problem?
Any help will be appreciated.
Thanks.