[code=php]$limit = 400;
if (strlen($summary) > $limit)
$summary = substr($summary, 0, strrpos(substr($summary, 0, $limit), ' ')) . '...';
echo $summary;
I am using bbcode in my script
but bbcode could not show if I limited my body string.
because the end tags of bbcode will cut off.[/code]