note 108497 added to function.wordwrap
| From: | ytwguru at gmail dot com | Date: | Tue, 01 May 2012 23:01:06 +0000 |
| Subject: | note 108497 added to function.wordwrap | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-187420@lists.php.net to get a copy of this message | ||
I've seen a few solutions to the same problem. Here's a solution to breaking long text
with a space. In this case it breaks after matching 27 characters.
$content = preg_replace("/([^\s]{27})/", "$1 ", $content);
You can probably write a function for this...
----
Server IP: 69.147.83.197
Probable Submitter: 68.188.117.225
----
Manual Page -- http://www.php.net/manual/en/function.wordwrap.php
Edit -- https://master.php.net/note/edit/108497
Del: integrated -- https://master.php.net/note/delete/108497/integrated
Del: useless -- https://master.php.net/note/delete/108497/useless
Del: bad code -- https://master.php.net/note/delete/108497/bad+code
Del: spam -- https://master.php.net/note/delete/108497/spam
Del: non-english -- https://master.php.net/note/delete/108497/non-english
Del: in docs -- https://master.php.net/note/delete/108497/in+docs
Del: other reasons-- https://master.php.net/note/delete/108497
Reject -- https://master.php.net/note/reject/108497
Search -- https://master.php.net/manage/user-notes.php