title: strpos is not matching
body: <p>I want search one string and get related values, but in test the function, in each times search words(<code>Title</code> Or <code>Would</code> Or <code>Post</code> Or <code>Ask</code>) displaying(give) just one output <code>Title,11,11</code> !!!! how can fix it?</p>
  
  <pre><code>  // test array
    $arr = array('Title,11,11','Would,22,22','Post,55,55','Ask,66,66');
    // define search function that you pass an array and a search string to
    function search($needle,$haystack){
      //loop over each passed in array element
      foreach($haystack as $v){
        // if there is a match at the first position
        if(strpos($needle,$v) == 0)
          // return the current array element
          return $v;
      }
      // otherwise retur false if not found
      return false;
    }
    // test the function
    echo search("Would",$arr);
  </code></pre>