How to encompass the first letter in every word with HTML tags?
For example:
$string = replace_first_word("some simple text",'<big>{L}</big>');
echo $string; //returns: <big>s</big>ome <big>s</big>imple <big>t</big>ext
edit:
ohhh, forgot to mention one important point, it Needs to work with UTF-8 Unicode…
because I’m planning to support both Russian and English with this.
Try this:
Or if you want it in a function: