excerpt code
Hey maybe I finally get to help someone instead of begging for help.
Nick, here's an excerpt code that works really good. It goes to the last complete word so you don't end up with any embarrassing incomplete words.
LOL Don't expect this of me often though, a guy wrote this for me and I just manged to apply it to another page I was working on...probably just lucky.
<?php function excerpt($message,$size = 150){
$message = substr($message,0,$size);
$point = strrpos($message,' ');
$message = substr($message,0,$point);
return $message.' ...';
}
?>
<?php do { ?>
<tr class="<?php echo $WARRT_AltClass1->getClass(true); ?>" >
<td><div id="new_prod_image"><img src="new_prod_thumb/<?php echo $row_rs_tech_index['prod_thumb1']; ?>" width="120" height="80" border="0"></div>
<div id="new_prod_title"><?php echo $row_rs_tech_index['new_prod_title']; ?></div>
<br />
<div id="new_prod_article"><?=excerpt($row_rs_tech_index['new_prod_article']); ?></div></td>
You'll need to add the function called "excerpt" at the top of the code as shown and change your echo line as shown in the bottom line of this code.
Roger