$intLength) { $arrTemp = explode($sep,$strText); $numwords = count($arrTemp); for ($c=0; $c<$numwords; $c++) { if (strlen($strTemp) <= $intLength) { $strTemp = $strTemp.$arrTemp[$c]." "; } } $CropSentence = $strTemp."... "; echo $CropSentence; } else { $CropSentence = $strText; echo $CropSentence; } } ?>