Best way to remove trailing slashes in urls with php?

$url = rtrim($url,"/"); As a side note, look up any PHP function by doing the following: php.net/functionname php.net/rtrim php.net/trim.

Stackoverflow is so much faster :-D – daniel Mar 6 '10 at 14:04 7 Give a man a fire and he's warm for a day, set a man on fire and he's warm for the rest of his life. You get my point. The php.net" rel="nofollow">php.net website is one of the language's killer features -- use it.

– Erik Mar 6 '10 at 14:05 @daniel: SO isn't your personal search engine, though. Avoiding any effort in answering your question yourself is generally not well received ... – Joey Mar 6 '10 at 14:06 1 I think that avoiding effort is fine is you think the question will have value for others. I have just stumbled onto this answer and am happy I did.SO is really becoming a solid competitor to php.net" rel="nofollow">php.net for a PHP developer.

– Lex Fridman Mar 6 '10 at 4:21.

1 No, don't use regex for this. – Richard Knop Mar 6 '10 at 14:51 Besides, the RE would fail pretty nicely for URLs that also contain slashes in the middle. – Joey Mar 6 '10 at 16:08.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions