Say for example I have the following code:
My very long title Another long title
If I wanted to
See this question:
function wrap($string, $limit) { $wstring = explode("\n", wordwrap($string, $limit, "\n") ); return $wstring[0] . '...'; }
Edit: (including <= $limit check)