配列 ( [108-3752685-0517825] => 配列 ( [0] => 6300-00 ) [107-5010391-7170621] => 配列 ( [0] => 0054-00 ) [105- 5621773-8281824] => 配列 ( [0] => 0049-00 ) )
配列 ( [2200320000123] => 配列 ( [0] => 0054-00 ) [2200320123 501] => 配列( [0] => 0049-00 ) [220032012395200] => 配列 ( [0] => 0049-00 ) )
配列 ( [108-3752685-0517825] => 配列 ( [0] = > 6300-00 ) [107-5010391-7170621] => 配列 ( [0] => 0054-00 ) [105-5621773-8281824] => 配列 ( [0] => 0049-00 ) [ 0] => 配列 ( [0] => 0054-00 ) [1] => 配列 ( [0] => 0049-00 ) [2] => 配列 ( [0] => 0049 -00 ) )
array_merge でマージした後、2 番目の配列のキー名が消えてしまいました。私の使い方は間違っていますか? ?
そうじゃないですか?
$a = array ( '108-3752685-0517825' => array ( 0 => '6300-00', ), '107-5010391-7170621' => array ( 0 => '0054-00', ), '105-5621773-8281824' => array ( 0 => '0049-00', ),);$b = array ( '2200320000123' => array ( 0 => '0054-00', ), '2200320123501' => array ( 0 => '0049-00', ), '220032012395200' => array ( 0 => '0049-00', ),);$t = array_merge($a, $b);print_r($t);
Array( [108-3752685-0517825] => Array ( [0] => 6300-00 ) [107-5010391-7170621] => Array ( [0] => 0054-00 ) [105-5621773-8281824] => Array ( [0] => 0049-00 ) [2200320000123] => Array ( [0] => 0054-00 ) [2200320123501] => Array ( [0] => 0049-00 ) [220032012395200] => Array ( [0] => 0049-00 ))
$new_order_list=GetSaleOrder('new',1);$re_order_list=GetSaleOrder('re',1);$order_list=array_merge( $new_order_list, $re_order_list );print_r($new_order_list);print_r($re_order_list);print_r($order_list);
Array ( [250-5564686-0137465] => Array ( [0] => 6677-00 ) [250-1149332-5735041] => Array ( [0] => 6650-01 ) [108-3752685-0517825] => Array ( [0] => 6300-00 ) [107-5010391-7170621] => Array ( [0] => 0054-00 ) [105-5621773-8281824] => Array ( [0] => 0049-00 ) ) Array ( [2200320000123] => Array ( [0] => 0054-00 ) [2200320123501] => Array ( [0] => 0049-00 ) [220032012395200] => Array ( [0] => 0049-00 ) ) Array ( [250-5564686-0137465] => Array ( [0] => 6677-00 ) [250-1149332-5735041] => Array ( [0] => 6650-01 ) [108-3752685-0517825] => Array ( [0] => 6300-00 ) [107-5010391-7170621] => Array ( [0] => 0054-00 ) [105-5621773-8281824] => Array ( [0] => 0049-00 ) [0] => Array ( [0] => 0054-00 ) [1] => Array ( [0] => 0049-00 ) [2] => Array ( [0] => 0049-00 ) )
でも私の結果は間違っていて、どこで間違ったのかわかりません