Good day!

need help with array processing. Nothing happens.

You need to pull the data from the params array and write to the new array, saving the number of these elements in [params] the number is unknown!

Array ( [0] => Array ( [cart_id] => 1 [uid] => 142 [name] => Аккаунт [order_time] => 2016-09-16 [date_time1] => 2016-09-17 [date_time2] => 2016-09-21 [status] => 1 [params] => Array ( [0] => Array ( [cart_id] => 1 [good_id] => 1515 [ssysname] => lily [art_code] => 1515 [price] => 29.32 ) ) ) [1] => Array ( [cart_id] => 2 [uid] => 42 [name] => Новый тест [order_time] => 2016-09-16 [date_time1] => 2016-09-17 [date_time2] => 2016-09-21 [status] => 2 [params] => Array ( [0] => Array ( [cart_id] => 2 [good_id] => 1715 [ssysname] => rose [art_code] => 1115 [price] => 569.32 ) [1] => Array ( [cart_id] => 2 [good_id] => 5615 [ssysname] => irise [art_code] => 9865 [price] => 8889.32 ) ) ) 

    1 answer 1

    Suppose we see an array of $ M in the question, then

     $P = array(); foreach($M as $k => $buket){ $P = array_merge($P, $buket['params']) } var_dump($P); // Посмотрим, что получилось.