function find_words() { $a = mysql_query("SELECT word from dictionary")or die(mysql_error()); while($a1=mysql_fetch_row($a)) $words[]=$a[0]; return preg_replace('/'.implode('|',$words).'/i','$1',the_content()); }