title: assigning a value from a array to a variable in codeigniter
body: <p>i want to save a value from a array to a variable .for doing a if condition check . this is my code inside models folder . i got a errormysqli_fetch_array() expects parameter 1 to be mysqli_result, object given .but the $query returns a array value.</p>
  
  <pre><code>public function this_is_try(){
      $this-&gt;db-&gt;select('*');
      $this-&gt;db-&gt;from('partnerprofile');
      $this-&gt;db-&gt;where('User_Id','20'); 
  
      $query = $this-&gt;db-&gt;get();
      $query-&gt;result_array();
  
      $row = mysqli_fetch_array($query);
      $user_id = $row['User_Id'];
      $agefrom = $row['AgeFrom'];
  
      print $user_id;
      exit;
  }
  </code></pre>