非常抱歉问这个愚蠢的问题,我因为Magento而头脑一片空白。
问题在于:
我拥有一个数组:
array(2) {
[0]=>
array(3) {
["product_name"]=>
string(12) "Test Product"
["product_qty"]=>
string(6) "2.0000"
["product_price"]=>
string(7) "15.0000"
}
[1]=>
array(3) {
["product_name"]=>
string(6) "Test 2"
["product_qty"]=>
string(6) "3.0000"
["product_price"]=>
string(7) "25.0000"
}
}
我该如何将此转换为:
<input type="hidden" name="product1" value="Test Product" />
<input type="hidden" name="amount1" value="2" />
<input type="hidden" name="qty1" value="15" />
<input type="hidden" name="product2" value="Test 2" />
<input type="hidden" name="amount2" value="3" />
<input type="hidden" name="qty2" value="25" />
感谢您的回答。