|

02-28-2007, 09:02 PM
Replace:
$output.=$loop[$x][title] ."<br />";
With:
$limit = '25'; // Set to your preference
$textin = $loop[$x][title];
if(strlen($textin)>$limit){
$textin = substr($textin,0,$limit);
$textout = substr($textin,0,-(strlen(strrchr($textin,' '))) )."…";}
else{$textout = $textin;}
$output.=$textout ."<br />";
This shortens the string to whatever you specify as the limit, drops any word fragment, and ads the ellipsis (…)
Last edited by gregbatch : 02-28-2007 at 09:33 PM.
Reason: correction
|