PHP Function to break sentence after X characters and add dots...
Posted on 2013-02-05
I'm struggling with a function to break a sentence after X characters. What i had worked oke, until the broken word contains special characters like:
ö ë & "
If the X character was one of the UTF-8 chars of the special char, strange chars would be shown.
How to build a function that also prevents breaking the output of special chars.