Is it possible??
A:
You should probably play around with the template system.
$tmpl = array (
'table_open' => '<table border="0" cellpadding="4" cellspacing="0">',
'heading_row_start' => '<tr>',
'heading_row_end' => '</tr>',
'heading_cell_start' => '<th>',
'heading_cell_end' => '</th>',
'row_start' => '<tr>',
'row_end' => '</tr>',
'cell_start' => '<td>',
'cell_end' => '</td>',
'row_alt_start' => '<tr>',
'row_alt_end' => '</tr>',
'cell_alt_start' => '<td>',
'cell_alt_end' => '</td>',
'table_close' => '</table>'
);
$this->table->set_template($tmpl);
More info here:
xil3
2010-07-03 12:09:35
A:
I would stay away from the CI table class if i were you; it is overly messy and doesnt really make things any easier or save you work.
I prefer this:
<table cellspacing="0" cellpadding="4">
<tr>
<th>Col One</th>
<th>Col Two</th>
<th>Col Three</th>
</tr>
<?php if($table_data != FALSE){?>
<?php foreach($table_data->result() as $row){?>
<tr <?php echo (expr to find the row)? 'class="your_class"' : ''; ?>>
<td></td>
<td></td>
<td><a href="#"></a></td>
</tr>
<?php }?>
<?php }?>
</table>
DRL
2010-07-06 00:22:23