Possible Duplicate:
PHP: str_replace that only acts on the first match?
Now I used str_ireplace($find,$replace,$str)
which replaces all the words which are present in $str
.
I want to replace first occurrence of a word in a string with the given string.