[eluser]fatdog[/eluser]
Hi,
I'm new with CI and MVC, so please keep that in mind.
What's wrong with this code on the controller?
Code:
function index() {
$this->load->model('proyects_model');
$data['proyectos'] = $this->proyects_model->get_proyects($some_params);
$this->load->model('news_model');
$data['novedades'] = $this->news_model->get_news($some_params);
$this->template->load('template', 'home_view', $data);
}
When I output the results in the view, the results are "adding up" the results from the models.
Meaning that the output should be like:
PROYECTS
- TABLE WITH PROYECTS
NEWS
- TABLE WITH NEWS
Instead I'm getting this:
PROYECTS
- TABLE WITH PROYECTS
NEWS
- TABLE WITH PROYECTS
- TABLE WITH NEWS
Thanks