explode and in_Array search not working
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/5040451/explode-and-in-array-search-not-working">explode and in_Array search not working</a>  </p>
</blockquote>



<p>codepad here <a href="http://codepad.org/ZQz0Kn3R" rel="nofollow">http://codepad.org/ZQz0Kn3R</a></p>

<pre><code>function processContent($content, $min_count = 2, $exclude_list = array()) {
    $wordsTmp = explode(' ', str_replace(array('(', ')', '[', ']', '{', '}', "'", '"', ':', ',', '.', '?'), ' ', $content));
    $words = array();
$wordsTmp2 = array();
$omit = array('and', 'or', 'but', 'yet', 'for', 'not', 'so', '&amp;', '&amp;amp;', '+', '=', '-', '*', '/', '^', '_', '\\', '|');
if(count($exclude_list)&gt;0){
    $omit = array_merge($omit, $exclude_list);
}
foreach ($wordsTmp as $wordTmp) {
   if (!empty($wordTmp) &amp;&amp; !in_array($wordTmp, $omit) &amp;&amp; strlen($wordTmp) &gt;= $min_count) {
             $words[] = $wordTmp;
    }
}
return $words;
}
$filter_array = explode("\n", words list separated by \n new line here);
print_r(processContent('String gere for filtering', $min_word_length, $filter_array));
</code></pre>

<p>The variable $filter_array is passed in to the exclude_list also is merged to omit variable but does not get filtered in return value. only first $omit value is filtered. Is there something wrong in code??</p>
