Tell me it is possible to combine arrays into one, my order writes in one order table, and the goods in order_product.
order
Array ( [0] => Array( [order_id] => 52 [firstname] => test [lastname] => tst [email] => Test [telephone] => test [payment_address_1] => Отделение №1: ул. Гагарина,22 [payment_method] => Новая почта [date_added] => 2017-03-15 15:51:44 [date_modified] => 2017-03-15 15:51:44 ) ) order_product
Array ( [0] => Array ( [order_product_id] => 281 [id_order] => 52 [name] => Тапочки [model] => Закрытые [quantity] => 1 [total] => 25.00 [oll_total] => 25.00 ) [1] => Array ( [order_product_id] => 280 [id_order] => 52 [name] => Носки [model] => Закрытые [quantity] => 1 [total] => 20.50 [oll_total] => 20.50 ) It is possible to get an array of this kind
Array ( [0] => Array( [order_id] => 52 [firstname] => test [lastname] => tst [email] => Test [telephone] => test [payment_address_1] => Отделение №1: ул. Гагарина,22 [payment_method] => Новая почта [name] => Тапочки,Носки [oll_total] => 25.00+20,05 [date_added] => 2017-03-15 15:51:44 [date_modified] => 2017-03-15 15:51:44 ) )
$order[0]['name] = implode(',', array_map(function($p){ return $p['name];}, $order_product))- teran