note 52277 deleted from function.preg-replace by didou
| From: | didou@php.net | Date: | Sun, 23 Apr 2006 22:51:33 +0000 |
| Subject: | note 52277 deleted from function.preg-replace by didou | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-109230@lists.php.net to get a copy of this message | ||
Note Submitter: ifyouwantblood.de
----
to spam at barad-dur dot nl and ur highlight function
first of all: it doesn´t work
second: i dont get it
my highlight function just looks like this and works perfect...
function highlight($haystack,$needle)
{
$haystack=preg_replace("/($needle)/i","<span
style='font-weight:bold'>\${1}</span>",$haystack);
return $haystack;
}