Web
>>
Development
>>
PHP
>>
How to highlight matching words
$string = "one two three four"; $result = preg_replace("/(one)|(two)/","
replacebegin:content:replaceend
",$string); print $result;
Please enable JavaScript to view the
comments powered by Disqus.