Welcome Guest, Not a member yet? Register   Sign In
News and statistics in the left column
#10

[eluser]Bikun[/eluser]
Good suggestion. By some reason $this->load->vars($array) didn't want to work, but the following has worked out and solved my issue:

SiteController:
Code:
$GLOBALS['news'] = $this->db->get('news');

View file:
Code:
<?php if($GLOBALS['news']->num_rows > 0):?>
    <?php foreach($GLOBALS['news']->result() as $row):?>

    <p>
        &lt;?=$row->date_time?&gt; | &lt;?=$row->news?&gt;
    </p>

    &lt;?php endforeach;?&gt;
&lt;?php endif;?&gt;

Maybe it's not the most optimal solution, but it works. Thanks!


Messages In This Thread
News and statistics in the left column - by El Forum - 12-06-2008, 10:58 AM
News and statistics in the left column - by El Forum - 12-06-2008, 11:57 AM
News and statistics in the left column - by El Forum - 12-06-2008, 12:03 PM
News and statistics in the left column - by El Forum - 12-06-2008, 02:09 PM
News and statistics in the left column - by El Forum - 12-08-2008, 08:53 AM
News and statistics in the left column - by El Forum - 12-08-2008, 09:09 AM
News and statistics in the left column - by El Forum - 12-08-2008, 09:56 AM
News and statistics in the left column - by El Forum - 12-08-2008, 12:45 PM
News and statistics in the left column - by El Forum - 12-08-2008, 12:47 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:11 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:25 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:31 PM
News and statistics in the left column - by El Forum - 12-08-2008, 01:38 PM
News and statistics in the left column - by El Forum - 12-09-2008, 05:26 AM
News and statistics in the left column - by El Forum - 12-09-2008, 10:45 AM



Theme © iAndrew 2016 - Forum software by © MyBB