title: search a php array for partial string match
body: <p>I have an array and I'd like to search for the string <code>'green'</code>. So in this case it should return the <code>$arr[2]</code></p>
  
  <pre><code>$arr = array(0 =&gt; 'blue', 1 =&gt; 'red', 2 =&gt; 'green string', 3 =&gt; 'red');
  </code></pre>
  
  <p>is there any predefined function like in_array() that does the job <strong>rather than looping through it</strong> and compare each values?</p>