title: Codeigniter - passing multiple value to view
body: <p>I am trying to build a month report with Codeigniter.
  i have problem in parse value to view,
  when i enable profiler, i get 12 month query</p>
  
  <p>Controller</p>
  
  <pre><code>$this-&gt;load-&gt;model('dash_model');
  $data1= $this-&gt;dash_model-&gt;get_user_all();
  $ind = $this-&gt;dash_model-&gt;monthreport();
  $this-&gt;output-&gt;enable_profiler(TRUE);
  
  $data = array(
            'mont' =&gt; $ind,
            'blok' =&gt; $data1
          );
   print_r($data);
   $this-&gt;parser-&gt;parse('blank', $data);
  </code></pre>
  
  <p>the output print_r data </p>
  
  <pre><code>Array
  (
  [mont] =&gt; Array
      (
          [0] =&gt; stdClass Object
              (
                  [trans_email] =&gt; 0
              )
  
      )
  </code></pre>
  
  <p>and dash_model</p>
  
  <pre><code>for($i=1; $i&lt;=12;)
      {
       $month=array("","01","2","3","4","5","6","7","8","9","10","11","12");
      $m = $month[$i];
      $query2=$this-&gt;db-&gt;query("select count(*) as trans_email from trans_email where lup LIKE '2014-$m%' ");
          $i++;
  
      }
      return $query2-&gt;result();
  </code></pre>
  
  <p>how i get output select count(*) as trans_email from trans_email where lup LIKE '2014-01%' and next month to view ?
  like
   month 1 = 356 data
   month 2 = 2000 data and next</p>
  
  <p>i'm trying this : <a href="https://stackoverflow.com/questions/13905942/codeigniter-passing-multiple-values-to-view">Codeigniter - passing multiple values to view</a> 
  but nothing happens</p>
  
  <p>update
  i'm trying to add this code into dash_model </p>
  
  <pre><code>  $i++;
                $resultarray[$i]=$query2-&gt;result();
      }
      return $resultarray;
  </code></pre>
  
  <p>and i got some error </p>
  
  <blockquote>
    <p><strong>* Object of class stdClass could not be converted to string*</strong></p>
  </blockquote>