note 32545 deleted from function.strstr by alindeman
| From: | alindeman@php.net | Date: | Fri, 30 May 2003 23:01:34 +0000 |
| Subject: | note 32545 deleted from function.strstr by alindeman | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-49450@lists.php.net to get a copy of this message | ||
Note Submitter:
----
if u want to do the same thing only from the end of the string it is kinda simple just use strrev().
it is useful when there is a character which repeats more than once and u want to get everything
from the beginning untill the last time it appears.
$str = "/www/public_html/mydir/subdir";
$str = strrev(strstr(strrev($str),"/"));
// $str = "/www/public_html/mydir/"