Trying to write a function to correct case of a set of anacroyms, but can't see how to do it more logically..
I have this at the moment
$str = str_ireplace(" worda ", " Worda ", $str);
$str = str_ireplace(" wordb ", " woRrdb ", $str);
and so on, its a long list!
Is there a way I could have a set of strings to replace with a set of replacements? Aka:
worda = Worda
wordb = woRdb
I've seen other examples using preg_replace too but can't see a way to do it using that function either.