Hi i copied the function below from notes in the php manual
http://au.php.net/manual/en/function.str-replace.php
function str_replace_count($find,$replace,$subject,$count)
{
$subjectnew = $subject;
$nC="";
$pos = strpos($subject,$find);
if ($pos !== FALSE)
{
while ($pos !== FALSE)
{
$nC = $nC + 1;
$temp = substr($subjectnew,$pos+strlen($find));
$subjectnew = substr($subjectnew,0,$pos) . $replace . $temp;
if ($nC >= $count)
{
break;
}
$pos = strpos($subjectnew,$find);
} // closes the while loop
} // closes the if
return $subjectnew;
}
I get this a warning:
Warning: strpos(): Empty delimiter for the line:
$pos = strpos($subject,$find);
I am using PHP Version 4.3.8.
Please Help! Thanks