note 19958 deleted from function.strpos by didou
| From: | didou@php.net | Date: | Mon, 01 Dec 2003 15:55:53 +0000 |
| Subject: | note 19958 deleted from function.strpos by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-61211@lists.php.net to get a copy of this message | ||
Note Submitter:
----
One easy way I found when looking at the PHP source of someone else is this:
(note that its psudocode, syntax may be off a bit)
$pos = substr (haystack, " " . needle) - 1;
if ($pos == -1) {
//not found
}
else {
//found
}