Is there a php string function to trim a string after a particular character. I had a look on the php.net site and did a google search but couldn\'t find anything. The only
You could use explode:
$string = "/gallery/image?a=b"; list($url,$querystring) = explode('?', $string, 2);