Re: Grabbing ALL $_POST var at once.
| From: | 1LT John W. Holmes | Date: | Mon, 06 May 2002 19:16:42 +0000 |
| Subject: | Re: Grabbing ALL $_POST var at once. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-96310@lists.php.net to get a copy of this message | ||
extract() wouldn't do you any good here, you'd still have to use echo $one,
echo $two, etc...so what are you gaining?
If you just want the values displayed, use the foreach() method someone
already posted. You can use implode() to combine the whole array in to a
single string...if you need something more than that, let us know. With that
many elements, maybe it's time to rethink your layout or naming conventions.
---John Holmes...
----- Original Message -----
From: "David J Jackson" <david.j.jackson@pickledbeans.com>
To: "1LT John W. Holmes" <holmes072000@charter.net>
Cc: <php-general@lists.php.net>
Sent: Monday, May 06, 2002 3:07 PM
Subject: Re: [PHP] Grabbing ALL $_POST var at once.
> John ---
> Thanks for your reply, but let me rephase the question.
> Let say I have a form with 50 fields on it do I have to:
>
> echo $_POST['one']
> ....
> .....
> .....
> echo $POST['fifty']
>
>
> Or should I, could I use extract()?
>
> Thanks in advance,
> David
>
> p.s I said it was UGLY :)
>
>
> > ?>
> >
> > If that's too hard to understand, use extract().
> >
> > ---John Holmes...
> >
>
>
>