example, the following preg_replace will take the string
reviews/payroll-relief-from-accountantsworld.html
payroll
and assuming payroll is the needle, it will return
reviews/<a href = "blah">payroll</a>-relief-from-accountantsworld.html <a href = "blah">payroll</a>
how can i keep word boundary from ignoring the / slash when searching for substrings? thanks
Code: Select all
$words[$i] = '/\b'.$words[$i].'\b/';
$content = preg_replace($words, $Links, $content);