Re: Retrieving a list of field names
| From: | Ernest E Vogelsinger | Date: | Thu, 22 May 2003 17:15:37 +0000 |
| Subject: | Re: Retrieving a list of field names | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-148582@lists.php.net to get a copy of this message | ||
At 19:01 22.05.2003, Daniel J. Rychlik said:
--------------------[snip]--------------------
>Hello,
>
>I am relatively new to PHP, coming from a background in perl. I was
>wandering if their was a set function that would retrieve the field names
>from a HTML form. I have built a rather long HTML form and I wanted to use
>some shortcuts or smart function to retrieve the field name and their
>values. Rather than using a lot of $_POST = "fieldname" statements.
--------------------[snip]--------------------
Since $_POST and $_GET are arrays, you can retrieve the array keys using
array_keys($_POST), or array_keys($_GET) respectively.
--
>O Ernest E. Vogelsinger
(\) ICQ #13394035
^ http://www.vogelsinger.at/