Re: Help with array creation

From: Date: Tue, 20 Mar 2001 08:41:29 +0000
Subject: Re: Help with array creation
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-44696@lists.php.net to get a copy of this message
Just use $HTTP_POST_VARS and $HTTP_GET_VARS. (Recent PHP4 is always compiled with "enable-track-vars", if you are using older PHP set track-vars to true in php.ini) Read http://www.php.net/manual/en/language.variables.php and http://www.php.net/manual/en/language.variables.external.php Regards, -- Yasuo Ohgaki "Chris Carbaugh" <cjtech2000@yahoo.com> wrote in message news:98503983901@mail.igateway.com... > > 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 > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#44696) next »