OK in simple terms...What!
you want to replace the 2nd you with something.. ok lets say i wanted to replace the 2nd you with me,
<?php
$yourStr = "Hi, How are you today, are you ok?, i hope you are";
$find = "you";
$replace = "Me";
$Occ = 2;
$LPos = 0;
for($n=0;$n<$Occ;$n++)
{
$LPos = strpos(strtolower($yourStr), strtolower($find), $LPos+1);
}
$MyStr = substr($yourStr, 0, $LPos);
$MyStr .= $replace;
$MyStr .= substr($yourStr, $LPos+strlen($find), strlen($yourStr));
echo $yourStr."<br />";
echo $MyStr;
die;
?>