title: Multidimensional Array To Mysql Codeigniter
body: <p>A little help how can I create an input query using this array? Or how 
     can I pass it in the table? my table layout sample is this:</p>
  
  <p>sales_table</p>
  
  <pre><code> id   |   product_name   |   price   |   qty   |   subtotal       
  </code></pre>
  
  <p>This is derived from the var_dump() function.<br>
  Here is my code in array</p>
  
  <pre><code>//array code from unserialized function
      $products = unserialize($this-&gt;session-&gt;userdata('product_list'));
  
  //This is the output.
  Array
  (
      [2] =&gt; Array
          (
              [id] =&gt; 2
              [product_name] =&gt; NOKIA 5110
              [product_desc] =&gt; Cellphone
              [product_price] =&gt; 500.00
              [product_qty] =&gt; 1
              [product_amount] =&gt; 500
              [product_code] =&gt; NOKI2012-84353
          )
  
      [3] =&gt; Array
          (
              [id] =&gt; 3
              [product_name] =&gt; HP IPAQ RW6828
              [product_desc] =&gt; Cellphone
              [product_price] =&gt; 1500.00
              [product_qty] =&gt; 1
              [product_amount] =&gt; 1500
              [product_code] =&gt; HP I2012-08386
          )
  )
  </code></pre>