split string into chunks
Posted: Sun May 27, 2007 8:50 pm
feyd | Please use
Now, I'd like to split that URL's query string part into chunks.
to get the 'query'-part I could also use :
Any ideas.
Cheers
Jan
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hello,
Hope you can get me going with this:
I've got the following URL:Code: Select all
http://mysite.com/abc/xsl/search?q=dc.date.lastmodified:%5b2007-05-01T00:00:00Z%20TO%202007-05-19T00:00:00Z%5d&user=username&sr=resource&type=rssCode: Select all
parse_url gives me sopmething like this:
[scheme] => http
[host] => mysite.com
[path] => /abc/xsl/search
[query] => q=dc.date.lastmodified:%5b2007-05-01T00:00:00Z%20TO%202007-05-19T00:00:00Z%5d&user=username&sr=resource&type=rssCode: Select all
$url = 'http://mysite.com/abc/xsl/search?q=dc.date.lastmodified:%5b2007-05-01T00:00:00Z%20TO%202007-05-19T00:00:00Z%5d&user=username&sr=resource&type=rss';
$q_str = parse_url($url, PHP_URL_QUERY);
print $q_str;
// that would give me something like this:
// q=dc.date.lastmodified:%5b2007-05-01T00:00:00Z%20TO%202007-05-19T00:00:00Z%5d&user=username&sr=resource&type=rssCheers
Jan
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]