Replacing words in php with preg_replace in a given div area

welcome

New Member
want to replace some words on the fly on my website.$pattern = '/\bWord\b/i'; $content = preg_replace($pattern,'Replacement',$content);That works so far. But now i want only change the the words which are inside div id="content"How do i do that?
 
Back
Top