in reply to truncating a line

untested:
$str = length($str)>17 ? substr($str,0,17).'...' : $str;


-pete
"Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere."