This php tutorial will help you that how will apply limit displaying characters form you message and not cut out your word.
substr($message, start, length);
This result shows 14 characters from your message
This is not good. We want to display “Limit Displayed Characters…” Let’s solve this problem in example 2.
1. Define how many characters you want to display.
2. Find what is the last character displaying.
3. If the last character displaying is not ” ” (space) then go to next character until we found it.
4. Display your message.
|—|——————— code ——————–|—|