title: foreach loop return problem
body: <p>hi i write a function to find in array but its not working when loop find something match its not retuning true value checks to the end any idea</p>
  
  <pre><code>function findinArray($find,$array){
      foreach($find as $key =&gt; $value){
          if (in_array($find,$array)) {
              return true;
          }else{
              return false;
      }       }
  }
  if(findinArray(array("a","b"),array("a")){
           echo "Match";
  }
  </code></pre>
  
  <p>thanks</p>