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