Crear una tabla con estilos de datatable alimentada de un archivo config.php
function generateDataTable( $table, $fields ){ $html = '<table id="' . $table . '" class="display">'; $html .= '<thead>'; $html .= '<tr>'; foreach($fields as $field){ $html .= '<th>' . $field . '</th>'; } $html .= '</tr>'; $html .= '</thead>'; $html .= '<tbody>'; $html .= '</tbody>'; $html .= '</table>'; return $html; }