[eluser]pickupman[/eluser]
Yes, and yes.
Code:
$this->load->helper('url');
$this->load->library('table');
$this->table->set_heading('ID', 'Title', 'Link');
foreach($items as $row)
{
$this->table->add_row($row->id, $row->title, anchor('page/'.$row->id, 'View'));
}
echo $this->table->generate();
//Or use this foreach loop
<table>
<thead>
<tr>
<td>ID</td>
<td>Title</td>
<td>Link</td>
</tr>
</thead>
<tbody>
<?php foreaach($items as $row) :?>
<tr>
<td><?php echo $row->id;?></td>
<td><?php echo $row->title;?></td>
<td><a >id;?>">View</a></td>
</tr>
<?php endforeach;?>
</tbody>
</table>
So it's about 5 lines of code using the table class, but all php. Or its several lines of html with a little bit of php. Depends on people's opinion of how much php should be in views.
EDIT: Some reason my code is being butchered.