Return short text snippet function Posted 4th December 2016 by Admin & filed under PHP. function textSnippet($string,$length=200){ return preg_replace('/\s+?(\S+)?$/', '', substr($string, 0, $length+1)); } Leave a Reply Cancel replyYour email address will not be published. Required fields are marked *Comment * Name * Email * Website
Leave a Reply