Ads Inside Post

Search in This Blog

load model in view codeigniter


How to load model in CodeIgniter view? It is not a good idea to load model in view, but sometime it is a requirement to load model in view.


Create the instance of CodeIgniter as below:
$ci_inst =&get_instance();

Then load your model as below:

now you can access model as below:


$ci_inst =&get_instance();