[eluser]daulex[/eluser]
awesome, it works
ok, another question, I'm trying to make a list of titles with the dates, it works fine for me, if I do this:
function:
Code:
function index()
{
$data['query'] = $this->db->get('template');
$this->load->view('news',$data);
}
view:
Code:
<? foreach($query->result() as $row): ?>
<p><?=$row->title?> (<?=$row->date?>)</p>
<? endforeach;?>
and it works fine and outputs:
Quote:My first post (2008-05-29)
Second test (2008-05-29)
Third test (2008-05-29)
Now, how can I re-arrange it? I would like the newer posts to be on the top and the older ones on the bottom, what do I need to do for that?
Thanks!