title: Why my view show Error: Array to string conversion
body: <p>I make table form in controller function and call table to show in view page.</p>
  
  <p>This my code in view page</p>
  
  <pre><code>&lt;?php 
      foreach($tables as $table){
          echo $tables;
      }
  ?&gt;
  </code></pre>
  
  <p>and this is my controller </p>
  
  <pre><code>$table ='';
      $tables[]= array();
      $result = array();
      $param = new stdClass();
  
      if(sizeof($_GET) &gt; 0){
          $param-&gt;date_from = $this-&gt;input-&gt;get('date_from');
          $param-&gt;date_to = $this-&gt;input-&gt;get('date_to');
          $param-&gt;sales_name = $this-&gt;input-&gt;get('sales_name');
          $data['result'] = $this-&gt;m_commission-&gt;check_invoice_user ($param);
          foreach ($result as $result){
          $table = '&lt;div&gt;'.$result-&gt;INVOICEDATE.'&lt;/div&gt;';
          }
          $tables[] = $table;
      }
      $data['tables'] = $tables;
      $data['team'] = $this-&gt;m_user-&gt;get_team();
      $this-&gt;load-&gt;view('v_header');
      $this-&gt;load-&gt;view('v_test', $data);
      $this-&gt;load-&gt;view('v_footer');
  </code></pre>
  
  <p>my model i'm checked query already it's working.</p>