While developing on localhost via XAMPP I used mysqli_fetch_all in my code. But after uploading on godaddy shared hosting, its not working.
I researched on internet and found out server should use MySQLnd to run mysqli_fetch_all. So I can't run my current code on server.
I need exact alternative of this code. Any suggestions?
Current code:
$result = mysqli_query($con,$query);
$arr = mysqli_fetch_all($result, MYSQLI_ASSOC);
$totalrecords = count($arr);
$json = array('sEcho' => '1', 'iTotalRecords' => $totalrecords, 'iTotalDisplayRecords' => $totalrecords, 'aaData' => $arr);
echo json_encode($json );