limiting text output


#1

Does anybody know how to modify this to limit the text output of title to say 20 characters?

$output.=$loop[$x][title] ."<br />";

#2

Wordwrap :)
Or perhaps str_split might suit your needs too.