note 72491 deleted from function.substr-replace by nlopess
| From: | nlopess@php.net | Date: | Sun, 21 Jan 2007 15:55:17 +0000 |
| Subject: | note 72491 deleted from function.substr-replace by nlopess | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-122004@lists.php.net to get a copy of this message | ||
Note Submitter: will g
----
i am trying to remove the page name from a url
for instance i have:
http://nl2.php.net/manual/add-note.php
and i wanto remove everything from the right-hand side until the /
so i am left with:
http://nl2.php.net/manual/
i thought i could use substr_replace but cant because every url is different so i cannot specify a
number of characters to remove... i just need it to remove any characters to the right of the last /
HOW DO I DO IT !!! aaaaahhhh ... been trying for hours.... somebody please help!