I want to pass a class variable from a model to a controller. Basically something like this:
$query = $this->db->query("SELECT * FROM news ORDER BY id DESC LIMIT 10");
foreach($query->result() as $news){
$this->news->getInfo($news->id);
$data = array(
'ID' => $id,
'TITLE' => $title, //All of these variables would be set by the news->getInfo function
'BODY' => $body,
'DATE' => $date
);
}