I am having small problem. I am trying to replace words in sentence i.e.
HELLO World WHAT
by
Hello World What
so far have way to detecting it:
preg_replace('/(\b[A-Z][A-Z]+\b)/sm','$1', $string);
but it does nothing as I can’t put as an argument ucwords(‘$1’).
Any help would be great.
cheers,
/Marcin
P.S.
this kind of methods are not good: ucwords(strtolower($string)); as I want to leave all what wasn’t all caps as it was.
It is slightly more efficient to use an anonymous function rather then call on the
/emodifier.