title: Search for PHP array element containing string
body: <pre><code>$example = array('An example','Another example','Last example');
  </code></pre>
  
  <p>How can I do a loose search for the word "Last" in the above array?</p>
  
  <pre><code>echo array_search('Last example',$example);
  </code></pre>
  
  <p>The code above will only echo the value's key if the needle matches everything in the value exactly, which is what I don't want. I want something like this:</p>
  
  <pre><code>echo array_search('Last',$example);
  </code></pre>
  
  <p>And I want the value's key to echo if the value contains the word "Last".</p>