/ Published in: PHP
URL: http://www.the-art-of-web.com/php/truncate/
// quick function to cut back on the length of content
Expand |
Embed | Plain Text
function trunCate($string, $limit, $break=".", $pad="...") { // return with no change if string is shorter than $limit // is $break present between $limit and the end of the string? } } return $string; }
You need to login to post a comment.
