Posted by Sean on 11/28/05 19:21
Actually what am i saying, whats wrong with parse_url????
Example 1. A parse_url() example
<?php
$url = 'http://username:password@hostname/path?arg=value#anchor';
print_r(parse_url($url));
?>
The above example will output:
Array
(
[scheme] => http
[host] => hostname
[user] => username
[pass] => password
[path] => /path
[query] => arg=value
[fragment] => anchor
)
It returns the query string as part of an array.
Navigation:
[Reply to this message]
|