Re: url function
| From: | Jesper Juhl | Date: | Wed, 30 Aug 2000 07:59:41 +0000 |
| Subject: | Re: url function | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-14339@lists.php.net to get a copy of this message | ||
You could use parse_url()
http://www.php.net/manual/function.parse-url.php
to get the right part of
the url, and then use split() to split it in variable/value pairs
(remember to use urldecode() to decode the values).
Best regards,
Jesper Juhl
>>>>>>>>>>>>>>>>>> Oprindelig meddelelse
>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<
Den 8/29/00, 5:14:05 PM, skrev bas@webdisplay.nl (Bas Jochems) til emnet
[PHP] url function:
> Hello,
> Suppose i have:
> http://www.sit.com/index.php?word1=bike&word2=house
> Which function can i use to get all variables out of a URL?
> the variables like "word1" and "word2" are not the same everytime
> so i wanna know all variables and their values in the current URL.
> any help would be really appreciated
> regards
> Bas
> --
> 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