I have the following code and need it to only echo out 100 words or less in the description rather than the entire description. Is there anyway to do that by editing this code?
public static function getExcerpt($profile) {
$out='';
if(!empty($profile['description'])) {
$out.=$profile['description'].' '.__('', 'lovestory');
}
return $out;
}
Thanks!