I have a string which contains a rather long text ($text). I also have the string $replace, containing "music" (all in small letters).
I want to replace all $replace in the $text string. This could be done with str_replace.
str_replace($replace,"<B>$replace</B>",$text);
Or something like that. But on some places in $text "music" may have an uppercase first letter. Or maybe even an uppercase second letter. I would like it to be changed.
That is, I want all "music" (not depending on upper or lower cases) in the $text string to get "<B>" in front of them and "</B>" behind them.
Can anyone help me with this?