Datatable Not Doesnt Display Ajax Data Correct
I am using DataTables and want to use Ajax to load my data. But I get this error when I load the page: DataTables warning: table id=example - Requested unknown parameter 'DocentID'
Solution 1:
Try removing the first json_encode()
. There's no need to encode it twice.
include_once('DB_Handler.php');
$result = mysqli_query($mysqli, "SELECT DocentID FROM gebruiker");
$rows = array();
while ( $row = mysqli_fetch_array($result))
{
$rows[] = $row;
}
echo json_encode($rows);
Post a Comment for "Datatable Not Doesnt Display Ajax Data Correct"