note 78744 deleted from function.wordwrap by danbrown
| From: | danbrown@php.net | Date: | Sun, 17 May 2009 18:29:13 +0000 |
| Subject: | note 78744 deleted from function.wordwrap by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-155125@lists.php.net to get a copy of this message | ||
Note Submitter: andrej dot pavlovic at gmail dot com
----
Wordwrap for utf8. Easy to understand and works with the $cut parameter:
<?php
function utf8_wordwrap($str,$width=75,$break="\n", $cut=false){
return utf8_encode(wordwrap(utf8_decode($str), $width, $break, $cut));
}
?>