note 70742 added to function.substr-count
| From: | flobi at flobi dot com | Date: | Thu, 26 Oct 2006 02:07:11 +0000 |
| Subject: | note 70742 added to function.substr-count | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-119124@lists.php.net to get a copy of this message | ||
Making this case insensitive is easy for anyone who needs this. Simply convert the haystack and the
needle to the same case (upper or lower).
substr_count(strtoupper($haystack), strtoupper($needle))
----
Server IP: 64.71.164.2
Probable Submitter: 216.104.148.141
----
Manual Page -- http://www.php.net/manual/en/function.substr-count.php
Edit -- https://master.php.net/note/edit/70742
Del: integrated -- https://master.php.net/note/delete/70742/integrated
Del: useless -- https://master.php.net/note/delete/70742/useless
Del: bad code -- https://master.php.net/note/delete/70742/bad+code
Del: spam -- https://master.php.net/note/delete/70742/spam
Del: non-english -- https://master.php.net/note/delete/70742/non-english
Del: in docs -- https://master.php.net/note/delete/70742/in+docs
Del: other reasons-- https://master.php.net/note/delete/70742
Reject -- https://master.php.net/note/reject/70742
Search -- https://master.php.net/manage/user-notes.php