my question: How do I delete the last element of a string??
i.e.: an url ends like this: .../index.php/
and now I need to trim the last slash otherwise relatively linked images won't load anymore
This problem with the last slash occures when I link to a file that starts a session and gets a variable. then it returns to the page it was loaded from (via $HTTP_REFERER), and at that point it adds a slash to the end...and another one if I reopen it, to change registered variable...and so on.
So is there a possibility to cut this last slash of every time it adds it even without knowing the actual length of - in this case - the url ??