note 87301 added to function.preg-match-all
| From: | AlexCorzo at osu1 dot php dot net | Date: | Fri, 28 Nov 2008 20:51:56 +0000 |
| Subject: | note 87301 added to function.preg-match-all | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-147225@lists.php.net to get a copy of this message | ||
meaneye,
On your code you may want to use strtolower, so the search is not case sensitive...
<?php
$db_text = bin2hex(stripslashes(utf8_decode(strtolower($db_text))));
$word = bin2hex(strtolower($word));
$found = preg_match_all("/($word)+/i", $db_text, $matches);
?>
Cheers,
----
Server IP: 69.147.83.197
Probable Submitter: 201.230.123.206
----
Manual Page -- http://www.php.net/manual/en/function.preg-match-all.php
Edit -- https://master.php.net/note/edit/87301
Del: integrated -- https://master.php.net/note/delete/87301/integrated
Del: useless -- https://master.php.net/note/delete/87301/useless
Del: bad code -- https://master.php.net/note/delete/87301/bad+code
Del: spam -- https://master.php.net/note/delete/87301/spam
Del: non-english -- https://master.php.net/note/delete/87301/non-english
Del: in docs -- https://master.php.net/note/delete/87301/in+docs
Del: other reasons-- https://master.php.net/note/delete/87301
Reject -- https://master.php.net/note/reject/87301
Search -- https://master.php.net/manage/user-notes.php