title: multiple model not load in same controller in codeigniter
body: <p>i want to run multiple model in same controller but its show below error </p>
  
  <blockquote>
    <p>Severity: Notice</p>
    
    <p>Message: Undefined property: Home::$Company</p>
    
    <p>Filename: controllers/Home.php</p>
    
    <p>Line Number: 23</p>
  </blockquote>
  
  <pre><code>&lt;?php
  defined('BASEPATH') OR exit('No direct script access allowed');
  
  class Home extends CI_Controller {
  
      public function __construct()
      {
          parent::__construct ();
  
          $this-&gt;load-&gt;model('Product');
          $this-&gt;load-&gt;model('Company');
          //$this-&gt;load-&gt;model(array('Product','Company'));
  
  
      }
      public function index()
      {
  
          $Product = $this-&gt;Product-&gt;getProduct(10);
          if($Product)
          {
              $data['Product'] = $Product;
          }
          $Company = $this-&gt;Company-&gt;getCompany(10);
          if($Company)
          {
              $data['Company'] = $Company;
  
          }
          $this-&gt;load-&gt;view('Home',$data);
  
      }
  }
  </code></pre>
  
  <p>//Company Model</p>
  
  <p>
  
  <pre><code>class Company extends CI_Controller {
  
  
      function getCompany($limit=null,$start=0)
      {
          $data = array();
          $query = $this-&gt;db-&gt;query('SELECT * FROM user as u,category as c,sub_category as sc WHERE c.Category_Id=u._Category_Id and u._Sub_Category_Id=sc.Sub_Category_Id ORDER by rand() limit '.$start.','.$limit);
          $res   = $query-&gt;result();        
          return $res;
      }
      function getOneCompany($id)
      {
          $this-&gt;db-&gt;where('User_Id',$id);
          $query = $this-&gt;db-&gt;get('user');
          $res = $query-&gt;result();
          return $res;
      }
  }
  </code></pre>
  
  <p>// Product model
  
  
  <pre><code>class Product extends CI_Controller {
  
  
      function getProduct($limit=null,$start=0)
      {
          $data = array();
          $query = $this-&gt;db-&gt;query('SELECT * FROM product as p,user as u,category as c,sub_category as sc WHERE p._User_Id = u.User_Id and  c.Category_Id=u._Category_Id and u._Sub_Category_Id=sc.Sub_Category_Id ORDER by rand() limit '.$start.','.$limit);
          $res   = $query-&gt;result();        
          return $res;
      }
      function getOneProduct($id)
      {
          $this-&gt;db-&gt;where('User_Id',$id);
          $query = $this-&gt;db-&gt;get('user');
          $res = $query-&gt;result();
          return $res;
      }
  }
  </code></pre>