note 30266 deleted from language.types.array by curt

From: Date: Tue, 06 Jul 2004 02:29:44 +0000
Subject: note 30266 deleted from language.types.array by curt
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-72651@lists.php.net to get a copy of this message
Note Submitter: paolitooo@yahoo.com ---- For everybody to want send a array from one page a other page la solution is easy. every element of array must be send like hidden. example: /****************************************/ pag1.php <?php $arraydata = array("peru","machu picchu","maca","los incas","greit"); ?> <form name = "form" action="pag2.php" method = "post"> <?php for ($lo=0;$lo<sizeof($arraydata);$lo++) { ?> <input type="hidden" name="opcion[<?=$lo?>]" value="<?=$arraydata[$lo]?>"> <?}?> <input type="submit" name="enviar"> </form> /********************************************/ pag2.php <?php for ($lo=0;$lo<sizeof($opcion);$lo++) { echo "word $opcion[$lo]<br>"; } ?> /************************************/ I hope this helps . Anllelo Carreazo Yrizales. paolitooo@yahoo.com

« previous php.notes (#72651) next »