Bug #16134 Updated: wordwrap() with \n
| From: | martin at humany dot com | Date: | Fri, 03 May 2002 13:23:34 +0000 |
| Subject: | Bug #16134 Updated: wordwrap() with \n | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-6832@lists.php.net to get a copy of this message | ||
ID: 16134
Updated by: martin@humany.com
Reported By: junk@singles.de
Status: Open
Bug Type: Unknown/Other Function
Operating System: every
PHP Version: 4.1.0
New Comment:
php 4.2.0 handles this as you expected, and respects the optional
parameter which you specify what you want to use as separator, for
example
echo wordwrap(nl2br($text), 10, "<br />",1);
respects the "<br />" inserted by nl2br in the text.
echo wordwrap(nl2br($text), 10, "<br>",1);
does not since "<br />" != "<br>" :)
Previous Comments:
------------------------------------------------------------------------
[2002-03-18 03:20:02] junk@singles.de
Code: echo wordwrap("ab cd\nef gh ij kl",5);
Output:
ab
cd
ef gh
ij kl
Expected output:
ab cd
ef gh
ij kl
---------
Code: echo wordwrap("ab cd\nef gh ij kl",5,"\n",1);
Output:
ab
cd
ef gh
ij
kl
Expected Output:
ab cd
ef gh
ij kl
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=16134&edit=1