note 107135 deleted from function.parse-url by tularis
| From: | tularis@php.net | Date: | Tue, 10 Jan 2012 20:54:33 +0000 |
| Subject: | note 107135 deleted from function.parse-url by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185553@lists.php.net to get a copy of this message | ||
Note Submitter: valentiny510 at yahoo dot es
----
They say: "This function doesn't work with relative URLs. " and "... For any
other scheme this is invalid."
but in the practice is not true.
$uri = parse_url( '/search?q=one+var&other=var' );
Now $uri will be:
Array
(
[path] => /search
[query] => q=one+var&other=var
)
Use parse_str( $uri['query'] ) and works great. Cheers !