Perdón por hacer esta pregunta idiota, mi cabeza se apagó debido a magento.matriz PHP multidimensional convertir a formularios
Aquí está el problema:
que tengo aquí una matriz:
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"
}
}
¿Cómo puedo hacer esto a transformar:
<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" />
Gracias por su respuesta.
no deja de ser una cuestión de eco-ción de los contenidos de la matriz en un bucle. – gd1
La pregunta no es de ninguna manera idiota. He estado planeando hacer esta pregunta yo mismo. – Gandalf