Parse_url function
parse_url function parse a URL and return its components. This function returns an associative array with the following components which is listed below.
Scheme, host , port , user , pass , path , query after the question mark ? , fragment after the hash #.
Example :<?php
<?php$input = “http://localhost/first/index.php?param=54#id=2″;
$output=parse_url($input);
print_r($output);
// will give all the URL details as follows
Array ( [scheme] => http [host] => localhost [path] => /first/index.php [query] => param=54 [fragment] => id=2 )
?>
