note 112874 added to function.substr-compare
| From: | mail at rdeeson dot com | Date: | Wed, 31 Jul 2013 15:07:55 +0000 |
| Subject: | note 112874 added to function.substr-compare | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195839@lists.php.net to get a copy of this message | ||
If you are looking for something a little simpler - namely a function that can check if a small
string exists within a larger string starting at a particular index - then, as jimmetry at gmail dot
com points out in his note below, substring_compare() is not for you.
The function you need is strpos($haystack, $needle, $offset) - that's right, $needle
doesn't have to be a single character, and can be a string of any length.
----
Server IP: 69.147.83.199
Probable Submitter: 195.7.254.86
----
Manual Page -- http://php.net/manual/en/function.substr-compare.php
Edit -- https://master.php.net/note/edit/112874
Del: integrated -- https://master.php.net/note/delete/112874/integrated
Del: useless -- https://master.php.net/note/delete/112874/useless
Del: bad code -- https://master.php.net/note/delete/112874/bad+code
Del: spam -- https://master.php.net/note/delete/112874/spam
Del: non-english -- https://master.php.net/note/delete/112874/non-english
Del: in docs -- https://master.php.net/note/delete/112874/in+docs
Del: other reasons-- https://master.php.net/note/delete/112874
Reject -- https://master.php.net/note/reject/112874
Search -- https://master.php.net/manage/user-notes.php