The preg_replace I'm using isn't working. Basically, it's supposed to take a particular word within the content, and wrap a link to and internal page around the word. The spaces on each side of each variable are so that it only links the actual word, not a coincidental occurrence of the letters within another word.
If it makes a difference, the variables will all contain strings, so
$keyword_phrase might be something like "Contact Us "
$in_content_link might be something like "/contact-us/" or "http://www.domain.com/contact-us/"
PHP:
$paragraph1 = preg_replace('/ $keyword_phrase /', '/ $in_content_link /', $paragraph1, 1);
If it makes a difference, the variables will all contain strings, so
$keyword_phrase might be something like "Contact Us "
$in_content_link might be something like "/contact-us/" or "http://www.domain.com/contact-us/"