PHP Loop to search for string, execute if no match
<p>I am trying to search for multiple strings within a larger string and if none of them are a match, manipulate the original string. Here is the code:</p>

<pre><code>$searchthis = 'this is a string'
$arr = array('foo', 'bar');
foreach ($arr as &amp;$value) {
  if (strpos($searchthis, $value) !== false) {
    break;
  }
  else{
    $searchthis = $searchthis . ' addthis';
  }
}
</code></pre>

<p>The problem is after searching the first string variable and not matching, the original searched string is manipulated before running the next test.</p>

<p>Any thoughts? Thanks in advance</p>
