I have a view which comport a table of data, this data is generated on a model. How can I call this model in my view to be posted on my view...? That\'s the Equivalent of wh
You can call model functions form view. Remember: This solution is against MVC pattern
Model:
function getdata() { $query = $this->db->query($sql); return $query->result_array(); }
View:
foreach($this->modelname->getdata() as $item) { }