note 55821 added to function.wordwrap
| From: | pawan at shopsbs dot com | Date: | Sun, 14 Aug 2005 17:32:37 +0000 |
| Subject: | note 55821 added to function.wordwrap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-93643@lists.php.net to get a copy of this message | ||
I wanted to use this function to add a particular text after a certain word count. Here is how I
implemented it:
$content = wordwrap($content, 200, "....<br /><!--more-->\n");
Above code adds the text '...<br/><!--more-->\n' after a 200 word count. I
know there are a million ways this can be done in PHP. Go PHP!
----
Manual Page -- http://www.php.net/manual/en/function.wordwrap.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+55821
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes&reason=non-english
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+55821&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+55821&report=yes
Search -- http://master.php.net/manage/user-notes.php