title: strrpos in PHP finding last character position instead?
body: <pre><code>$string = "01234567890*****12345678901234567890*";  
  echo strrpos($string,'*****');
  </code></pre>
  
  <p><em>why does this return 36 and not 15? (<a href="http://writecodeonline.com/php/" rel="nofollow">click here</a> to test)</em>  </p>
  
  <blockquote>
    <p><a href="http://php.net/manual/en/function.strrpos.php" rel="nofollow">from php.net</a><br>
    <strong>strrpos</strong> — Find the position of the last occurrence of a substring
    in a string</p>
  </blockquote>
  
  <p>What am I missing out on???<br>
  Thank you!</p>
  
  <p><strong>SOLUTION:</strong>
  using the answers bellow, I provided a PHP4 alternative </p>
  
  <pre><code>$haystack = "01234567890*****12345678901234567890*";  
  $needle              = '*****';
  
  $position = strlen($haystack) - strlen($needle) - strpos(strrev($haystack),strrev($needle));
  echo $position; // 11
  </code></pre>