title: passing array javascript to controller codeigniter
body: <p>i having problem with passing array from view to controller. Here's the case:</p>
  
  <p>VIEW</p>
  
  <pre><code>    &lt;script type="text/javascript"&gt; 
  function displayDet(kode,rowNo,rows){
      var jsarr = new Array();
      jsarr = {'kode': kode,'rowno':rowNo,'rows':rows};
      //alert(jsarr['kode']+jsarr['rowno']+jsarr['rows']);
      window.location.href='http://localhost/ci_hiandgirls/index.php/sales/sales/form_so_arr/'+jsarr;  
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>CONTROLLER</p>
  
  <pre><code>public function form_so_arr( $params = array() ){
      foreach($params as $val){
          $view['detRows'] = $val['rows'];
          $view['kode'] = $val['kode'];
          $view['rowNo'] = $val['rowNo'];
      }       
      $this-&gt;load-&gt;view('sales/form',$view);
  }
  </code></pre>
  
  <p>Is this right ? it's show error message "Invalid argument supplied for foreach()". I just want to catch array from javascript then send back the values to VIEW. kindly please help me.  </p>