Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/10/2003, 12:04
Anita24
 
Fecha de Ingreso: agosto-2003
Ubicación: Oaxaca
Mensajes: 41
Antigüedad: 20 años, 7 meses
Puntos: 0
ayuda con arreglos

No entiendo como puedo sacar los datos de mi variable, podrian ayudarme??? dentro de array3.php almaceno mi arreglo que se encuentra dentro de un <form> y en el action del form vuelvo a llamar a array3.php, mi codigo es el siguiente:

----array3.php----

<?php
$Boton=$HTTP_POST_VARS["Boton"];

if ($Boton=="Enviado")
{ //$Alumno=$HTTP_POST_VARS["$Alumno"];
while (list ($key, $val) = each ($HTTP_POST_VARS["Alumno"]))
{ echo "$key => $val<br>"; }
}

if ($Boton=="")
{
$Cont=1;
print "<FORM NAME='Calif' ACTION='array3.php' METHOD='POST' >";
for ($X=0;$X<4;$X++)
{ $Alumno[$X]=$X;
print "<INPUT TYPE='text' NAME='$X' MAXLENGTH='4' SIZE='4'>" ;
$Cont++;
}
print "<INPUT TYPE='HIDDEN' NAME='Alumno' VALUE=$Alumno >"; //CAMPO OCULTO
print "<INPUT TYPE='SUBMIT' NAME='Boton' VALUE='Enviado'>";
print "</form>";

reset ($Alumno);
print "<table> <tr> <td> Contador <td> Control";
while (list ($Key, $Contine)=each($Alumno))
{ print "<tr><td>$Key <td>$Contine </tr>";
}
}
?>


y me manda el siguiente error:

Warning: Variable passed to each() is not an array or object in c:\archivos de programa\apache group\apache\htdocs\pruebas\ejemplos\array3.php on line 7


que es lo que tengo que hago mal?
__________________
'.' @nita '.'