//the following code is to get only 50 character
$subtag = substr(strip_tags ($tag), 0, 50);
//to get words
//there might be a better way to do this but i use the following code
$words = explode(" ", $tag);
for($i=0; $i<50; $i++)
$nwords[$i] = $words[$i];
$t_50_words = join(" ", $nwords);