My code is returning nothing. I can't understand what the problem is.
my code
$results = $mysqli->query("SELECT * FROM tbl_pdf ORDER BY id DESC");
$dataarray = array();
while($row =mysqli_fetch_array($results))
{
$dataarray [] = [
'id'=>$row['id'],
'ptitle'=>$row['ptitle'],
'pdate'=>$row['pdate'],
'filelink'=>'http://'.$_SERVER['SERVER_NAME'].'/'.$row['filelink'],
'status'=>$row['status']
];
}
echo json_encode($dataarray);