我有一个表单,它发布了 4 个数组,我需要将它们组合起来并最终写入电子邮件。四个数组:
$quantityArray = $this->input->post('qty');
$dimensionArray = $this->input->post('dimension');
$thicknessArray = $this->input->post('thickness');
$descriptionArray = $this->input->post('description');
都将具有相同的数组长度,并且每个索引都是相关的。如何组合 4 个数组,例如
[0]
'qty' => '1',
'dimenesion => '2x2',
'thickness' => '2in',
'description' => 'this is the description'
[1]
'qty' => '1',
'dimenesion => '2x2',
'thickness' => '2in',
'description' => 'this is the description'
我已经尝试了 array_combined、array_merged 并且无法获得我正在寻找的结果。感谢您对此的帮助。