function crop_str_word($text, $max_words = 50, $sep = ' ') {
$words = split($sep, $text);
if ( count($words) > $max_words ) {
$text = join($sep, array_slice($words, 0, $max_words));
$text .= ' ...';
}
return $text;
}
// http://api.co.ua/trim-a-string-of-php-on-number-of-words.html