title: Find if an array value shows up in a string. (Kind of a reverse in_array?)
body: <p>On a site I'm working on there's a subheadline that only should be shown if the information isn't already shown in the main headline. The main headline is an arbitrary string, while the subheadline is created programatically. The subheadline is generated from the contents of a multi-dimensional array (the contents of which are also used for other parts of the page.)</p>
  
  <p>I used the PHP example of <code>foreach</code> to drill down through the array (only half-understanding how it was working), and then tried <code>strpos</code> to see if the values in the array were in the headline string. </p>
  
  <p>Unfortunately, it doesn't work. There is a high chance that I made a stupid mistake in how I thought it's supposed to work. Or that the variable that tells the site to hide the subhead ("hider") is constantly reset to "no" as a result of the other values in the array.</p>
  
  <pre><code>foreach ($arr_info as $i1 =&gt; $n1) {    
      foreach ($n1 as $i2 =&gt; $n2) {     
          foreach ($n2 as $i3 =&gt; $n3) {
              $pos = strpos($headline, $n3);
              if ($pos === false) {
                  $hider="no";
              } else {
                  $hider="yes";
              }
          }
      }
  </code></pre>
  
  <p>Any ideas? Greatly appreciate the help.</p>