title: Compare All strings in a array to all strings in another array, PHP
body: <p>What i am trying to do is really but i am going into a lot of detail to make sure it is easily understandable.
  I have a array that has a few strings in it. I then have another that has few other short strings in it usually one or two words.</p>
  
  <p>I need it so that if my app finds one of the string words in the second array, in one of the first arrays string it will proceed to the next action.
  So for example if one of the strings in the first array is "This is PHP Code" and then one of the strings in the second is "PHP" Then it finds a match it proceeds to the next action. I can do this using this code:</p>
  
  <pre><code>for ( $i = 0; $i &lt; count($Array); $i++) {
      $Arrays = strpos($Array[$i],$SecondArray[$i]);
  
      if ($Arrays === false) {
  
          echo 'Not Found Array String';
  
      }
      else {
          echo 'Found Array String';
  </code></pre>
  
  <p>However this only compares the First Array object at the current index in the loop with the Second Array objects current index in the loop.</p>
  
  <p>I need it to compare all the values in the array, so that it searches every value in the first array for the First Value in the second array, then every value in the First array for the Second value in the second array and so on.</p>
  
  <p>I think i have to do two loops? I tried this but had problems with the array only returning the first value.</p>
  
  <p>If anyone could help it would be appreciated! 
  Ill mark the correct answer and + 1 any helpful comments!</p>
  
  <p>Thanks!</p>