$s = "sabcdefdadsdcasdfdasdsa";
$a = "a";
echo newstripos($s,$a,5); // 输出22
/**
* 写一个新的stripos, $count参数表示第count次出现的问题
**/
function newstripos($str, $find, $count, $offset=0)
{
$pos = stripos($str, $find, $offset);
$count--;
if ($count > 0 && $pos !== FALSE)
{
$pos = newstripos($str, $find ,$count, $pos+1);
}
return $pos;
}