Bug #11075 Updated: bad operation of nl2br function
| From: | swm@php.net | Date: | Thu, 24 May 2001 07:51:11 +0000 |
| Subject: | Bug #11075 Updated: bad operation of nl2br function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-56584@lists.php.net to get a copy of this message | ||
ID: 11075
Updated by: swm
Reported By: jkkim@mail.naver.com
Old-Status: Open
Status: Closed
Bug Type: Strings related
Operating system:
PHP Version: 4.0.5
Assigned To:
Comments:
Argh. Keep forgetting to close!
Previous Comments:
---------------------------------------------------------------------------
[2001-05-24 03:50:36] swm@php.net
As below.
---------------------------------------------------------------------------
[2001-05-24 03:43:16] swm@php.net
Please read the most recent manual entry (for 4.0.5).
nl2br -- Inserts HTML line breaks before all newlines in a string
Description
string nl2br (string string)
Returns string with '<br />' inserted before all newlines.
This is to support the latest HTML recommendation (XHTML 1.0)
---------------------------------------------------------------------------
[2001-05-24 02:55:57] jkkim@mail.naver.com
nl2br function seems do not operate correctly.
For example,
$a = "aaa
bbb";
$b = nl2br ($a);
The correct value of $b is following:
"aaa<br>
bbb"
But I got the wrong value like this:
"aaa
<br />
bbb"
FYI, I have used PHP language for 2 years and
the same code I tried worked well at the prior versions (PHP3.x, PHP4.0 ~ PHP4.0.4)
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=11075&edit=2