rtrim help

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
neridaj
Forum Commoner
Posts: 40
Joined: Fri Jan 05, 2007 9:55 pm

rtrim help

Post 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
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: rtrim help

Post by requinix »

It will trim ? characters, not everything up until a ?.

Try a combination of substr and strpos.
Post Reply