Tutorialsplane

how to load model in view codeigniter

How to load model in view codeigniter
You can load models in Codeigniter view as :

Example :

$this->load->model(‘product’);

$result =$this->product->productList();

foreach($result as $row) {

echo $row[‘product_name’];

 

}