note 96617 added to function.stristr
| From: | andy at osu1 dot php dot net | Date: | Mon, 08 Mar 2010 17:44:27 +0000 |
| Subject: | note 96617 added to function.stristr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-166791@lists.php.net to get a copy of this message | ||
Quick way to use this with an array for a needle:
$arr = array('search_term1','search_term2','search_term3');
foreach($arr as $key => $search_needle) {
if(stristr($haystack, $search_needle) != FALSE) {
echo 'execute this code if found';
}
}
----
Server IP: 69.147.83.197
Probable Submitter: 99.174.192.173
----
Manual Page -- http://www.php.net/manual/en/function.stristr.php
Edit -- https://master.php.net/note/edit/96617
Del: integrated -- https://master.php.net/note/delete/96617/integrated
Del: useless -- https://master.php.net/note/delete/96617/useless
Del: bad code -- https://master.php.net/note/delete/96617/bad+code
Del: spam -- https://master.php.net/note/delete/96617/spam
Del: non-english -- https://master.php.net/note/delete/96617/non-english
Del: in docs -- https://master.php.net/note/delete/96617/in+docs
Del: other reasons-- https://master.php.net/note/delete/96617
Reject -- https://master.php.net/note/reject/96617
Search -- https://master.php.net/manage/user-notes.php