note 26282 deleted from function.is-array by didou

From: Date: Sun, 18 May 2003 10:12:12 +0000
Subject: note 26282 deleted from function.is-array by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48494@lists.php.net to get a copy of this message
Note Submitter: ---- /* building a form parsing $HTTP_POST-VARS and debugging arrays */ <html> <head><title>My form page</title> </head> <body> <form name="form1" action="receiving_script" method="POST"> <? if (sizeof($HTTP_POST_VARS)>0) { reset ($HTTP_POST_VARS); while (list ($variable, $value) = each ($HTTP_POST_VARS)) { $$variable=$value; if (is_array($value) && sizeof($value) > 0) { reset ($value); while (list ($arrkey, $arrval) = each ($value)) { ?> <input type="hidden" name="<? print $variable ?>[<? print $arrkey; ?>]" value="<? print $arrval ?>"> <? $array=$variable."[".$arrkey."]"; $$array=$arrval; // print $array." => ".$$array; } } else { ?> <input type="hidden" name="<? print $variable ?>" value="<? print $value ?>"> <? $$variable=$value; //print $$variable; } } } ?> <input type="submit" value="Go!"> </form> </body> </html>

« previous php.notes (#48494) next »