I am attempting to add some styling to a table in Code Igniter, I realize CI has a built in table library to help achieve this. I'm unsure how to implement this in my specific implementation however. I'm looking to incorporate these inbuilt functions:
$this->load->library('table');
$this->table->set_heading(array('Name', 'Color', 'Size'));
How can I add those functions in my specific implementation?
I have the following controller:
public function ecomma(){
$this->load->model('report_model');
$data ['query'] = $this->report_model->generate_ecomm_data_report();
$this->load->view('report_view', $data);
}
My view:
<table>
<tbody>
<?php foreach($query as $row): ?>
<tr>
<td><?php echo $row->no_skus; ?></td>
<td><?php echo $row->brand; ?></td>
<td><?php echo $row->unique_models; ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>