/ Published in: PHP
I need often for dynamic websites a text snippet with an extact text length. Using the PHP function substr() is a solution, but makes the last word unreadable. This tiny function takes care about the max. string length characters, keeps the last word intact and will add a custom string to the end. This string can be some dots or maybe the link to the whole text.
URL: http://www.finalwebsites.com/portal