title: PHP - MYSQL Filter variable from while loop that contain any of specified words
body: <p>I got a <code>while loop</code> that outputs user's comments. 
  I need to filter the comments if it contains any of the word from <code>filter_table</code></p>
  
  <p>Query for the comment</p>
  
  <pre><code>$cm_qr = $db -&gt; prepare ("SELECT comment FROM comment_tbl WHERE post_id = :pid");
  $cm_qr -&gt; bindParam (":pid", $pid);
  $cm_qr -&gt; execute();
      while($row = $cm_qr -&gt; fetch()){
          $comment = $row_cm_qr['comment'];   
  
  
          }
  </code></pre>
  
  <p>Query for my filtered words</p>
  
  <pre><code>                $check_filter = $db -&gt; query ("SELECT filter_word FROM filter_tbl");
                  $check_filter -&gt; execute();
                  while($filter_row = $check_filter -&gt; fetch(PDO::FETCH_ASSOC)){
                      $fword = $filter_row['filter_word'];
                  }
                      $fwords = array($fword);
  </code></pre>