title: Codeigniter : How to separate implode results
body: <p>this is about options cart library in codeigniter. 
  i have options in product</p>
  
  <pre><code>$option = $item['options'];
  // result is $option = Array ( [Size] =&gt; 33 [color] =&gt; brown )
  </code></pre>
  
  <p>I managed to remove or convert an array to a string. result is</p>
  
  <pre><code>$option = implode(',', $option);
  print_r($option);
  // result is $option = 33,brown
  </code></pre>
  
  <p>My question is how to separate the results into something like this.</p>
  
  <pre><code>$option_size = 33;
  $option_color = brown;
  </code></pre>
  
  <p>Because the result will I put in the array and I will enter into the database.</p>
  
  <pre><code>$data_order[] = array(
          'invoice'        =&gt; $invoice,
          'nama_produk'    =&gt; $item['name_product'],
          'option_size'    =&gt; $option_size,
          'option_colour'  =&gt; $option_color,
          'qty'            =&gt; $item['qty'],
          'price'          =&gt; $price,
          'weight'         =&gt; $item['weight'],
            );
  $this-&gt;db-&gt;insert_batch('order_product', $data_order);
  </code></pre>
  
  <p>thankyou very much...</p>