How do I replace bad words with php?
<p>I have some text i need to filter out a list of bad words in like:</p>

<pre><code>$bad_words = array(
  'word1' =&gt; 'gosh',
  'word2' =&gt; 'darn',
);
</code></pre>

<p>I can loop through these and replace one at a time but that is slow right? Is there a better way?</p>

<p>thanks</p>
