note 78265 added to function.substr
| From: | jordancdarwin at googlemail dot com | Date: | Thu, 04 Oct 2007 21:26:07 +0000 |
| Subject: | note 78265 added to function.substr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131091@lists.php.net to get a copy of this message | ||
function short_name($str, $limit)
{
return (strlen($str) > $limit && <!--(int) --> $limit > 3) ? substr($str,
0, $limit - 3) . '...' : $str;
}
Rather than that awful mess that you added.
----
Server IP: 87.124.64.96
Probable Submitter: 86.150.138.6
----
Manual Page -- http://www.php.net/manual/en/function.substr.php
Edit -- https://master.php.net/note/edit/78265
Del: integrated -- https://master.php.net/note/delete/78265/integrated
Del: useless -- https://master.php.net/note/delete/78265/useless
Del: bad code -- https://master.php.net/note/delete/78265/bad+code
Del: spam -- https://master.php.net/note/delete/78265/spam
Del: non-english -- https://master.php.net/note/delete/78265/non-english
Del: in docs -- https://master.php.net/note/delete/78265/in+docs
Del: other reasons-- https://master.php.net/note/delete/78265
Reject -- https://master.php.net/note/reject/78265
Search -- https://master.php.net/manage/user-notes.php