PHP: How to find position of (user-defined) occurrence of a string using stripos
<p>There is strpos() to find First occurrence, and strrpos() to find last occurrence.</p>

<p><a href="http://www.tizag.com/phpT/php-string-strpos.php" rel="nofollow">This</a> tutorial explained that it's possible to get any occurrence using a loop, but that might be not fast when the haystack is big. And my code is looking ugly now.</p>

<p>Is there a way to find 2nd, 3rd, 4th, etc occurrence without looping over the haystack? I mean, finding the required occurrence directly without looping? Possible?</p>
