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 what I want to do with codeIgniter on php :
while($row = mysql_fetch_array($requet))
{
// code of displaying my data;
}
try using
$CI =& get_instance()
then load your model like this:
$CI->load->model('someModel')
then call your model function like this:
$result = $CI->someModel->somefunction()
then display using foreach
foreach($result as $row){ $row->somecolumnName }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With