I am trying to cut off text after 236 chars without cutting words in half and preserving html tags. This is what I am using right now:
$shortdesc = $_helper-         
        
I did in JS, hope this logic will help in PHP too..
splitText : function(content, count){
        var originalContent = content;
         content = content.substring(0, count);
          //If there is no occurance of matches before breaking point and the hit breakes in between html tags.
         if (content.lastIndexOf("<") > content.lastIndexOf(">")){
            content = content.substring(0, content.lastIndexOf('<'));
            count = content.length;
            if(originalContent.indexOf("", count)!=-1){
                content += originalContent.substring(count, originalContent.indexOf('>', originalContent.indexOf("", count))+1);
            }else{
                 content += originalContent.substring(count, originalContent.indexOf('>', count)+1);
            }
          //If the breaking point is in between tags.
         }else if(content.lastIndexOf("<") != content.lastIndexOf("")){
            content = originalContent.substring(0, originalContent.indexOf('>', count)+1);
         }
        return content;
    },
Hope this logic helps some one..