note 65234 added to function.wordwrap

From: Date: Thu, 27 Apr 2006 09:34:22 +0000
Subject: note 65234 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-109840@lists.php.net to get a copy of this message
this one is nice, because it does not put any linebreaks or empty spaces if there is enough space. It is not propper html as seen by validator.w3.org, but it works on IE and Moz. function splitLongWords($text, $max) { return preg_replace( '/([^\s]{'.$max.'})(?=[^\s])/', '$1<wbr>', $text); } ---- Server IP: 66.163.161.117 Probable Submitter: 212.202.198.130 (proxied: 1.1 LEO) ---- X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER autolearn=no version=2.64 ---- Manual Page -- http://www.php.net/manual/en/function.wordwrap.php Edit -- http://master.php.net/note/edit/65234 Del: integrated -- http://master.php.net/note/delete/65234/integrated Del: useless -- http://master.php.net/note/delete/65234/useless Del: bad code -- http://master.php.net/note/delete/65234/bad+code Del: spam -- http://master.php.net/note/delete/65234/spam Del: non-english -- http://master.php.net/note/delete/65234/non-english Del: in docs -- http://master.php.net/note/delete/65234/in+docs Del: other reasons-- http://master.php.net/note/delete/65234 Reject -- http://master.php.net/note/reject/65234 Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#109840) next »