![Antiguo](http://static.forosdelweb.com/fdwtheme/images/statusicon/post_old.gif)
04/04/2012, 15:44
|
![Avatar de Briss](http://static.forosdelweb.com/customavatars/avatar422282_5.gif) | | | Fecha de Ingreso: junio-2011
Mensajes: 1.293
Antigüedad: 13 años, 7 meses Puntos: 12 | |
Respuesta: Como puede mostrar el valos de un array en un input Cita:
Iniciado por gjx2 hice una prueba de laboratorio fijate bien en el codigo y adaptalo.
Código PHP:
Ver original<?php $_POST['clave3'] = array("p0","p1","p2","p3","p4","p5","p6","p7","p8"); $_POST['p1'] = array("p0","p1","p2","p3","p4","p5","p6","p7","p8"); foreach($_POST["clave3"] as $i => $value){ /* Update ..... */ } ?> GRACIAS EL DETALLE ES QUE MI DO WHILE esta basado por la consulta ningún array esta definido... seguiré investigando gracias otra vez <form action="<?php echo $editFormAction; ?>" method="post" id="form1"> <table border="0" class="normal"> <thead> <tr> </tr> </thead> <?php # Fijate en esto he inicializado la variable $i $i = 0; do { ?> <tbody> <tr> <td><?php echo $i; ?></td> <td><input type="text" name="p1[]" id="p1" value="<?php echo $_POST['p1'][$i]; ?>" /> </td> </tr> <?php $i++; } while ( $i < count($_POST['p1'])); ?> </tbody>
|