Thank you very much!
And for anyone else who stumbles upon this post - the following code works great(grabbed from php.net):
How to make a nice trim of text without break words in the middle :
$maxTextLenght=125;
$aspace=" ";
if(strlen($text) > $maxTextLenght ) {
$text = substr(trim($text),0,$maxTextLenght);
$text = substr($text,0,strlen($text)-strpos(strrev($text),$aspace));
$text = $text.'...';
}
And modified to work with my database ($myrow[""] grabbed from database):
$text = $myrow["articleBODY"];
$maxTextLenght=50;
$aspace=" ";
if(strlen($myrow["articleBODY"]) > $maxTextLenght ) {
$text = substr(trim($myrow["articleBODY"]),0,$maxTextLenght);
$text = substr($text,0,strlen($text)-strpos(strrev($text),$aspace));
$text = $text.'...';
}
Thanks again! 🙂