protected function limitedText($text, $limit = 200)
    {
        $postString = '...';
        $strCount = strlen(trim($text));
        $sLimitedText = $text;

        if($strCount > $limit)
        {
            $sLimitedText = substr($text, 0, $limit) . $postString;
        }

        return $sLimitedText;

    }
protected function limitedText($text, $limit = 200)
    {
        $postString = '...';
        $strCount = strlen(trim($text));
        $sLimitedText = $text;

        if($strCount > $limit)
        {
            $sLimitedText = substr($text, 0, $limit) . $postString;
        }

        return $sLimitedText;

    }
protected function limitedText ( $ text , $ limit = 200 ) { $ postString = '...' ; $ strCount = strlen ( trim ( $ text ) ) ; $ sLimitedText = $ text ; if ( $ strCount > $ limit ) { $ sLimitedText = substr ( $ text , 0 , $ limit ) . $ postString ; } return $ sLimitedText ; }
Returns a limited text

@param string $text
@param int $limit
@return string
Returns a limited text