Generation

generate functionThu, 06 Apr 2023

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; }

Want to kickstart your project?Use the new AI Studio to create your code