Hi CI people,
I have a question, regarding the mvc pattern. Is it “right” to OUTPUT content (store it in array) from a database from a model? Or should this be done first through a controller?
E. g, views/main.php have:
foreach($this->db_model->fetch() as $out):
I’m thinking it really should be done this way instead:
foreach($fetch_content as $out):
And in controllers/main.php it fetches the content and passes it on
$data['fetch_content'] = $this->db_model->fetch();
Which method is the most “right” one?
I appreciate your input, guys!