Page 1 of 1

rtrim help

Posted: Tue Feb 17, 2009 1:36 pm
by neridaj
Hey,

I don't understand why rtrim() isn't returning the referring page without the query string:

echo rtrim($_SERVER['HTTP_REFERER'], "?");

Thanks,

J

Re: rtrim help

Posted: Tue Feb 17, 2009 3:20 pm
by requinix
It will trim ? characters, not everything up until a ?.

Try a combination of substr and strpos.