[eluser]jtotheb[/eluser]
i have a model:
Code:
function contact_values()
{
$query = $this->db->get('column_data');
foreach($query->result_array() as $col_list)
{
return $col_list;
}
}
I have a controller:
Code:
function index()
{
$this->load->model('Testmodel');
$data['con_options']= $this->Testmodel->contact_values();
$this->load->view('selection', $data);
}
And i have a view:
Code:
<ul>
<?php foreach($con_options as $item):?>
<li><?=$item;?></li>
<?php endforeach;?>
</ul>
And it only shows the first value in the view.
Can anyone tell me where i'm going wrong?
I think it must be in the controller, that i'm not passing the model result as an array properly to the $data array.
If anyone can help i would be very grateful.
Thanks.