PHP Snippet 1:
$('#example').DataTable({
"ajax": "url",
"columns" : [
{"data": "keyname"},
{"data": "keyname"},
]
})
PHP Snippet 2:
$('#example').DataTable({
ajax: "url",
columns : [
{"data": "keyname"},
{"data": "keyname"},
]
})
PHP Snippet 3:
{
"data": [
{
"name": "Tiger Nixon",
"position": "System Architect",
"salary": "$320,800",
"start_date": "2011/04/25",
"office": "Edinburgh",
"extn": "5421"
},
/...
PHP Snippet 4:
"columns": [
{"PASS_ID"},
{"CLOCK_IN"},
{"START_LUNCH"},
{"END_LUNCH"},
{"CLOCK_OUT"}
]
PHP Snippet 5:
$.ajax({
url: "api/timemanageprocess.php",
method: "post",
dataType: "json",
success: function(response){
console.log( JSON.stringify(response) );
},
error: function(request, status, errorThrown){
console.log(errorThrown);
}
});