W welcome New Member Sep 15, 2012 #1 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?
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?