PHP: объединить массивы в цикле
public function getCheckoutForm(){ $arr = array( 'cmd' => '_cart', 'business' => 'some@mail', 'no_shipping' => '1', 'upload' => '1', 'return' => 'url', 'cancel_return' => 'url1', 'no_note' => '1', 'currency_code' => 'url2', 'bn' => 'PP-BuyNowBF'); $cpt=1; foreach($this->items as $item){ $arr1[] = array( 'item_number_'.$cpt.'' => $item['item_id'], 'item_name_'.$cpt.'' => $item['item_name'], 'quantity_'.$cpt.'' => $item['item_q'], 'amount_'.$cpt.'' => $item['item_price'] ); $cpt++; } […]