note 57388 deleted from function.strchr by bjori
| From: | bjori@php.net | Date: | Tue, 11 Apr 2006 20:36:32 +0000 |
| Subject: | note 57388 deleted from function.strchr by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-107801@lists.php.net to get a copy of this message | ||
Note Submitter: sottwell at sottwell dot com
----
This function actually behaves differently than strstr; strstr returns the remainder of the string
from the FIRST ocurrance of search item, while strchr returns the remainder of the string from the
LAST ocurrance of search item.
$haystack = test.this.txt;
$result1 = strstr($haystack, ".");
$result2 = strchr($haystack, ".");
will result in
.this.txt
.txt