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