Trim long words

Post

Comments   |   PHP

preg_replace('/([^\s]{25})[^\s]+/', '<span title="$0">$1...</span>', $string);

Leave a Reply