PHP – Truncate a string to a given length

This is a function I use to display the ellipses when I want to truncate and display a summary of a larger body of text.

Share: