note 28696 added to function.wordwrap

From: Date: Tue, 21 Jan 2003 09:48:12 +0000
Subject: note 28696 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-42511@lists.php.net to get a copy of this message
I use preg_replace instead... This function doesn't cut in HTML tags, just in the plain text. function WrapWords($str, $chars) { $str = preg_replace('/([^\s\<\>]{'.$chars.','.$chars.'})/', '\1 ', $str); return $str; } -- http://www.php.net/manual/en/function.wordwrap.php http://master.php.net/manage/user-notes.php?action=edit+28696 http://master.php.net/manage/user-notes.php?action=delete+28696 http://master.php.net/manage/user-notes.php?action=reject+28696

« previous php.notes (#42511) next »