Ver Mensaje Individual
  #4 (permalink)  
Antiguo 16/10/2010, 19:58
Avatar de bet7o
bet7o
 
Fecha de Ingreso: febrero-2010
Ubicación: DF
Mensajes: 315
Antigüedad: 15 años
Puntos: 20
Respuesta: Como llenar un array

Mira utiliza hazlo asi.

Código PHP:
Ver original
  1. <form action="" method="post" id="formulario" name="formulario">
  2.   Numero 1 <input type="text"  name="num[a]" / /><br />
  3.   Numero 2 <input type="text"  name="num[b]" /><br />
  4.   Numero 3 <input type="text"  name="num[c]" /><br />
  5.   Numero 4 <input type="text"  name="num[d]" /><br />
  6.   Numero 5 <input type="text"  name="num[e]" /><br />
  7.   Numero 6 <input type="text"  name="num[f]" /><br />
  8.   Numero 7 <input type="text"  name="num[g]" /><br />
  9.   Numero 8 <input type="text"  name="num[h]" /><br />
  10.   Numero 9 <input type="text"  name="num[i]" /><br />
  11.   Numero 10 <input type="text"  name="num[j]" /><br />
  12.   <input type="submit" name ="submit" value="enviar" />
  13. </form>
  14. <?php
  15. if(isset($_POST['num']))
  16. {
  17.   foreach($_POST['num'] as $ind => $num)
  18.     echo "$ind) $num<br />";
  19. }

Saludos!
__________________
Pero el no contaba con una cosa, mi peligroso desinteres por la vida humana