RE: Grabbing ALL $_POST var at once.
| From: | Andrew Chase | Date: | Wed, 08 May 2002 23:25:23 +0000 |
| Subject: | RE: Grabbing ALL $_POST var at once. | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96709@lists.php.net to get a copy of this message | ||
Try
foreach(array_keys($_POST) as $varname){
$$varname = $_POST[$varname];
}
(Works with $_GET to grab variables from the query string, too.)
-Andy
> -----Original Message-----
> From: David J Jackson [mailto:david.j.jackson@pickledbeans.com]
> Subject: Grabbing ALL $_POST var at once.
>
> The code below works (but its ugly), but I know there has to be a why to
> grab all the $_POST[] at once and then parse them out?
>
> Isn't there a why for me to access them directory without
> reassigning them?