note 69318 deleted from function.strlen by betz
| From: | betz@php.net | Date: | Thu, 31 Aug 2006 17:56:30 +0000 |
| Subject: | note 69318 deleted from function.strlen by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-116557@lists.php.net to get a copy of this message | ||
Note Submitter: info at jdmedia dot nl
----
Simple way to cut off long sentences:
$len = strlen($textold);
$limit = 65;
if($len > $limit) {
$textnew = substr($textold,0,$limit)."...";
} else {
$textnew = $row[1];
}