title: How to pass an array element to another array to store in database in php
body: <p>Hi i am facing one problem in passing the array elements to another array...</p>
  
  <pre><code>$order=$this-&gt;ro_model-&gt;get_ro_details($order_id);
  </code></pre>
  
  <p>By using above function i will get query results into array name called $order.</p>
  
  <p>Now i had form when it submits i will get some data from that form that i am saving in another name called $order_details.</p>
  
  <pre><code>$order_data=array(
  
      'amount'=&gt;$this-&gt;input-&gt;post('amount'
  );  
  </code></pre>
  
  <p>Now i wanna save both the arrays data in one table in database. For that what i thought was i can pass first array data to second array data and i will save all the data in one array. Then later i will send that array to a function which will insert the data into database.</p>
  
  <pre><code>$this-&gt;ro_model-&gt;add_amount($order_data);
  </code></pre>
  
  <p>My problem how to pass that first array data to second array...........</p>
  
  <ul>
  <li>Note: All these are i am doing in codeigniter framework.</li>
  </ul>