$count) { //$pos = mb_strpos($text, ' ', $count, 'UTF-8'); $text = mb_substr($text, 0, $count, 'UTF-8'); return $text.'...'; } else return $text; } }