try using
$CI =& get_instance()
then load your model as follows:
$CI->load->model('someModel')
then call your model function as follows:
$result = $CI->someModel->somefunction()
then display with foreach
foreach($result as $row){ $row->somecolumnName }
source
share