note 95965 deleted from function.substr by danbrown
| From: | danbrown@php.net | Date: | Mon, 01 Feb 2010 00:58:40 +0000 |
| Subject: | note 95965 deleted from function.substr by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-165536@lists.php.net to get a copy of this message | ||
Note Submitter: Keita
----
@viktor:
$string = removeFromEnd($string, '.jpg');
has the same effect like
$string = removeFromEnd($string, 'abcd');
or calling the function with any other 4 byte long string as second argument - it simply truncates
regardless of the content of the second argument, because you don't check the occurence of the
second argument within $string.