-------------- Original message ---------------------- From: Jason Barnett <[EMAIL PROTECTED]> > T.J. Mahaffey wrote: > > First time post, please be gentle. > > You will probably find parse_url() to be useful: > http://www.php.net/manual/en/function.parse-url.php > > <?php > > $url = > "http://username:[EMAIL > PROTECTED]/path?arg=value&arg2=value&arg3=value3#anchor" > ; > > $parts = parse_url($url); > $args = explode('&', $parts['query']); > > for($i = 0; $i < sizeof($args); $i++) { > list($key, $value) = explode('=', $args[$i]); > $query[$key] = urldecode($value); > } > > print_r($query); > > ?> parse_str will take care of turning the query string into key/value pairs http://us2.php.net/manual/en/function.parse-str.php
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php