note 75568 deleted from function.parse-url by tularis
| From: | tularis@php.net | Date: | Fri, 08 Jun 2007 12:43:27 +0000 |
| Subject: | note 75568 deleted from function.parse-url by tularis | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-127325@lists.php.net to get a copy of this message | ||
Note Submitter: Robert Hoath
----
To use this function to return a value rather than as an array -
<?php
$url = 'http://username:password@hostname/path?arg=value#anchor';
$url = parse_url($url);
echo $url['host'];
?>
You can replace 'host' with any of the stated array:
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)