title: multiple strpos ignores first value
body: <p>Ii want to find specific words in a text. Therefore I build an array and turn the values over to the <code>strpo_arr</code>-function. Here I split a <code>textarea</code> into its sentences and look in every sentence about these specific words, to highlight this sentence. This works, but if I have a target on the first sentence of this sentences-Array, the output of the part <code>$sentence</code> is empty. Is there anything I'm doing wrong? Many thanks!!</p>
  
  <pre class="lang-php prettyprint-override"><code>function strpos_arr($haystack, $needle) {
     if(!is_array($needle)) $needle = array($needle);
     foreach($needle as $what) {
        if(($pos = strpos($haystack, $what))!==false) return $pos;
    }
    return false;
  }
  
  $sentence = " ";
  foreach ($sentences as $sentence) {
     if(strpos_arr($sentence, $searchStringArr)){
        $subContent .= "&lt;span class='highlight'&gt; $sentence&lt;/span&gt; ";
     }else{
        $subContent .= " ".$sentence;
     }
  }
  </code></pre>