PHP code example of michaelthedev / php-datatables
1. Go to this page and download the library: Download michaelthedev/php-datatables library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
michaelthedev / php-datatables example snippets
use Michaelthedev\PhpDatatables\DataTablesHelper;
use Michaelthedev\PhpDatatables\DataTablesHelper;
$helper = new DataTablesHelper();
$helper->set('tableIdHere', function () {
// Your table data retrieval logic here
return [
['col1' => 'val1', 'col2' => 'val2'],
['col1' => 'val3', 'col2' => 'val4'],
// ...
];
});
$helper->processTableRequest('tableIdHere');
$tableIds = $helper->getTableIds();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.