我有5个这样的数组
print_r($_POST['ponumber']);
print_r($_POST['man_part_number']);
print_r($_POST['model']);
print_r($_POST['damaged']);
print_r($_POST['serial_number']);
print_r($_POST['skid']);
产生
Array
(
[0] => 111111
[1] => 111111
[2] => 111111
[3] => 111111
)
Array
(
[0] => 11C2555
[1] => 11C2555
[2] => 11C2555
[3] => 11C2555
)
Array
(
[0] => FORMS PRINTER 2500 SERIES
[1] => FORMS PRINTER 2500 SERIES
[2] => FORMS PRINTER 2500 SERIES
[3] => FORMS PRINTER 2500 SERIES
)
Array
(
[0] => 0
[1] => 0
[2] => 0
[3] => 0
)
Array
(
[0] => CNCQ202070
[1] => CNCQ210800
[2] => MY5203B1KQ
[3] => CN1863Q0PQ
)
Array
(
[0] => 1
[1] => 1
[2] => 1
[3] => 1
)
我需要根据键组合它们,以便我得到 4 个数组,看起来像这样
Array
(
[0] => 111111
[1] => 11C2555
[2] => FORMS PRINTER 2500 SERIES
[3] => 0
[4] => CNCQ202070
)
等等...
它需要匹配每个数组中的每个键,并将它们组合成一个数组。我正在尝试 array_combine 和 array_merge 但我认为这不是正确的方法。任何人?