note 23549 added to function.wordwrap

From: Date: Mon, 22 Jul 2002 01:44:24 +0000
Subject: note 23549 added to function.wordwrap
Groups: php.notes 
Request: Send a blank email to php-notes+get-33374@lists.php.net to get a copy of this message
It is also possible to consider this function as a tool for making text wrappable rather than simply for forcing wrapping. In other words, use a space as the break - rather than "br /" or "p" or \n or whatever - and the text becomes wrappable. $input = "I want to annoy you by inserting long wooooooooooooooooooooooooooooooooorrrrrrdddss into your guestbook."; $output = wordwrap($input, 40, ' ', 1); Will insert spaces into the words longer than 40 characters make the text wrappable by the browser. -- http://www.php.net/manual/en/function.wordwrap.php http://master.php.net/manage/user-notes.php?action=edit+23549 http://master.php.net/manage/user-notes.php?action=delete+23549 http://master.php.net/manage/user-notes.php?action=reject+23549

« previous php.notes (#33374) next »