March 25, 2014
Here is a useful PHP function that truncates a block of text without breaking a word. This is useful when creating an excerpt text and making sure that words are not cut off.
When calling the function, you can pass a word limit, the default is
150. Also, function accepts custom ellipses, default is