note 26351 added to function.wordwrap

From: Date: Sun, 27 Oct 2002 18:58:20 +0000
Subject: note 26351 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-38626@lists.php.net to get a copy of this message
I've extended one of the examples above so it does wrap "words" longer than a specific limit but will (in most cases) not touch any URLs since you may allow links in your messageboard/guestbook: $message = ereg_replace("([^ \/]{32})","\\1<wbr>",$message); Note that the slash will usually prevent URLs from being messed up if no single segment is longer than the given limit. -- http://www.php.net/manual/en/function.wordwrap.php http://master.php.net/manage/user-notes.php?action=edit+26351 http://master.php.net/manage/user-notes.php?action=delete+26351 http://master.php.net/manage/user-notes.php?action=reject+26351

« previous php.notes (#38626) next »