note 115074 deleted from function.mb-strimwidth by salathe
| From: | salathe@php.net | Date: | Mon, 21 Sep 2020 14:57:13 +0000 |
| Subject: | note 115074 deleted from function.mb-strimwidth by salathe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-215384@lists.php.net to get a copy of this message | ||
Note Submitter: Rich Mehta
----
I had a problem (as in another comment) with a space being between the trailing dots and the subject
being truncated. Here's how I fixed it:
<?php str_replace( " .", ".", mb_strimwidth( $subject, 0, 30, "..."
) ); ?>