When developing on localhost through XAMPP, I used mysqli_fetch_all in my code. But after you send shared hosting to godaddy, it does not work.
I searched on the Internet and found that the server must use MySQLnd to run mysqli_fetch_all. Therefore, I cannot run my current code on the server.
I need an exact alternative to 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 );
source share