'localhost', 'user' => 'root', 'pass' => 'XmRTSMQ9', 'db' => 'php_crud' ); $table = 'general'; $primaryKey = 'id'; $columns = array( array('db' => 'id', 'dt' => 0), array('db' => 'instruction', 'dt' => 1), array('db' => 'input', 'dt' => 2), array('db' => 'output', 'dt' => 3), array( 'db' => 'created_at', 'dt' => 4, 'formatter' => function ($d, $row) { return date('js M Y', strtotime($d)); } ), array( 'db' => 'id', 'dt' => 5, 'formatter' => function ($d, $row) { return 'Editar Eliminar'; } ) ); require('ssp.class.php'); // Output data as json format echo json_encode( SSP::simple($_GET, $dbDetails, $table, $primaryKey, $columns) );