RE: Help with array creation
| From: | Tim Ward | Date: | Tue, 20 Mar 2001 13:44:31 +0000 |
| Subject: | RE: Help with array creation | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-44740@lists.php.net to get a copy of this message | ||
they are already in one ... $HTTP_POST_VARS or $HTTP_GET_VARS
Tim Ward
Senior Systems Engineer
Please refer to the following disclaimer in respect of this message:
http://www.stivesdirect.com/e-mail-disclaimer.html
> -----Original Message-----
> From: Chris Carbaugh [mailto:cjtech2000@yahoo.com]
> Sent: 19 March 2001 21:58
> To: php-general@lists.php.net
> Subject: Help with array creation
>
>
>
> Hello,
>
> I'm trying to take the query string of a url and turn it into an
> associative array.
>
> Let's say I have a URL like
>
> myHost.com/somepage.php?val1=one&val2=two
>
> I can get the query with HTTP_SERVER_VARS["QUERY_STRING"],
> but how do I
> generate an array equivilent to
>
> array('val1'=>'one', 'val2'=>'two')
>
> Also, this example uses a GET method. First, can I do this?
> Also, can
> I do this with a POST method?
>
> Thanks,
> Chris
>
>