RE: [PHP-GENERAL] Adding variables to array?
| From: | Christopher Thompson | Date: | Mon, 22 May 2000 19:03:55 +0000 |
| Subject: | RE: [PHP-GENERAL] Adding variables to array? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-299@lists.php.net to get a copy of this message | ||
You may need to do this:
while( list($key,$field)=each($HTTP_POST_VARS) )
> -----Original Message-----
> From: Holger Heinze [mailto:heinze@cyracon.de]
> Sent: Monday, May 22, 2000 10:03 AM
> To: php-general@lists.php.net
> Subject: [PHP-GENERAL] Adding variables to array?
>
>
> Allright, probably its just me.... but here we go:
>
> reset ($HTTP_POST_VARS);
> while( $field=each($HTTP_POST_VARS) )
> {
>
>
> if ($field[1]=="")
> {
> echo "$field[0] is empty!<p>";
> $formfields[$index]=$field[0];
> $index++;
> }
>
> };
>
> I've tried the manpages, the forum, nothing. Could someone tell
> me why it doesn't store the fieldnames in the array?
>
> appreciate it.
>
> -Holger
>