an example of stored text is:
[text]<br><div><span style="font-family: Arial, Helvetica, sans; font-size: 11px; line-height: 14px; text-align: justify;">Contrary to popular belief, Lorem Ipsum is not simply random text.</span></div>[/text]
the trim im using is
Code: Select all
function TrimByLength($str, $len, $word) {
$end = "";
if (strlen($str) > $len) $end = "...";
$str = substr($str, 0, $len);
if ($word) $str = substr($str,0,strrpos($str," ")+1);
return $str.$end;
}Code: Select all
<?php echo TrimByLength($row_rsNews['newsDesc'], 100, false); ?>any ideas?