Hi i am facing one problem in passing the array elements to another array...
$order=$this->ro_model->get_ro_details($order_id);
By using above function i will get query results into array name called $order.
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.
$order_data=array(
'amount'=>$this->input->post('amount'
);
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.
$this->ro_model->add_amount($order_data);
My problem how to pass that first array data to second array...........
Use array_merge() function. Here you go: http://php.net/manual/en/function.array-merge.php
you can do it in 2 ways