title: Cannot use object of type CI_DB_mysqli_result as array
body: <p>Hello I got the this result</p>
  
  <blockquote>
    <p>A PHP Error was encountered</p>
    
    <p>Severity: Error</p>
    
    <p>Message: Cannot use object of type CI_DB_mysqli_result as array</p>
    
    <p>Filename: controllers/Threads.php</p>
    
    <p>Line Number: 48</p>
    
    <p>Backtrace:</p>
  </blockquote>
  
  <p>This is my codes in Controller </p>
  
  <pre><code>// category
  public function threadsview($slug) {
      // get threads category
      $data['item'] = $this-&gt;threads_model-&gt;getThreadsCategory($slug);
  
      $data['title'] = $data['item']['catname'];
      $data['desc'] = '';
  
      $this-&gt;load-&gt;view('themes/default/header', $data);
      $this-&gt;load-&gt;view('threads/threadsview', $data);
      $this-&gt;load-&gt;view('themes/default/footer');
  }
  </code></pre>
  
  <p>And the codes in my Model</p>
  
  <pre><code> //get threads categories by slug
      public function getThreadsCategory($slug) {
          $this-&gt;db-&gt;order_by('id','asc');
          $this-&gt;db-&gt;where('slug',$slug);
          $query = $this-&gt;db-&gt;get('threads_cat');
          return $query;
      }
  </code></pre>
  
  <p>The error is from this code </p>
  
  <pre><code>$data['title'] = $data['item']['catname'];
  </code></pre>
  
  <p>I hope someone can help me regarding on this..</p>