note 24023 added to function.str-replace

From: Date: Sun, 04 Aug 2002 14:59:43 +0000
Subject: note 24023 added to function.str-replace
Groups: php.notes 
Request: Send a blank email to php-notes+get-34262@lists.php.net to get a copy of this message
To do a 'Google' alike highligh with keeping the original case: function highlight($word, $haystack){ return preg_replace('|('.quotemeta($word).')|iU', '<b style="color: black; background-color: #ffff66">\\1</b>', $haystack); } -- http://www.php.net/manual/en/function.str-replace.php http://master.php.net/manage/user-notes.php?action=edit+24023 http://master.php.net/manage/user-notes.php?action=delete+24023 http://master.php.net/manage/user-notes.php?action=reject+24023

« previous php.notes (#34262) next »