ID: 16134 Updated by: [EMAIL PROTECTED] Reported By: [EMAIL PROTECTED] 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] [EMAIL PROTECTED] 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