note 91752 deleted from function.strpos by danbrown
| From: | danbrown@php.net | Date: | Wed, 24 Jun 2009 17:19:06 +0000 |
| Subject: | note 91752 deleted from function.strpos by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-157429@lists.php.net to get a copy of this message | ||
Note Submitter: nospam at nothanksafer3 dot com
----
Hey all, if you're going to want to search an ENTIRE string for a $needle, or word, do NOT use
this function, use substr_count() instead.
This function will skip the first word in an array of provided strings.
EJ:
$mysentences = array('abc she', 'the she is silly','she hat',);
$find = she;
this function will NOT show a match for 'she hat' because the word 'she' is the
first word in the string
switch to substr_count() in order for it to work correctly and show a match for it as well