Display the drop-down list

parse_url()

« parse_str | pathinfo »
<?php
$mixed 
parse_url (
    
// string $url
    
?  // [int $component = -1]
);
?>
Result
$mixed = [
  
'scheme' => 'http',
  
'host' => 'hostname',
  
'user' => 'username',
  
'pass' => 'password',
  
'path' => '/path',
  
'query' => 'arg=value',
  
'fragment' => 'anchor',
]
Examples
#1 parse_url  ("http://username:password@hostname/path?arg=value#anchor")
#2 parse_url  ("http://username:password@hostname/path?arg=value#anchor",
 
PHP_URL_PATH)
#3 parse_url  ("//www.example.com/path?googleguy=googley")
See also
basename, dirname, http_build_query, parse_str, pathinfo