Re: note 101642 added to function.nl2br
| From: | Artur Ejsmont | Date: | Fri, 31 Dec 2010 16:44:32 +0000 |
| Subject: | Re: note 101642 added to function.nl2br | ||
| References: | 1 2 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-175379@lists.php.net to get a copy of this message | ||
heheheh .... ok my bad i have missed it :- )
maybe my focus is not that great today.
happy new year
art
On 31 December 2010 15:35, Daniel Brown <danbrown@php.net> wrote:
> On Fri, Dec 31, 2010 at 10:29, <a.e@inne.pl> wrote:
>> The most important note is missing that nl2br does not remove \n character.
>>
>> It replaces \n with <br />\n
>>
>> <?php
>> $x = "A\nB";
>> $y = nl2br( nl2br( $x ) );
>>
>> // produces "A<br /><br />\nB"
>> ?>
>>
>> In addition \r is not removed/replaced either.
>> ----
>> Server IP: 69.147.83.197
>> Probable Submitter: 89.167.220.4
>
> No, it's not missing, it says it right in the function description:
>
> "Inserts HTML line breaks before all newlines in a string"
>
> If it doesn't indicate the same in the Polish translation
> (presuming that's what version you were reading), submit that as a
> documentation bug (http://bugs.php.net/), because it should.
>
> Thanks.
>
> --
> </Daniel P. Brown>
> Network Infrastructure Manager
> Documentation, Webmaster Teams
> http://www.php.net/
>
--
Visit me at:
http://artur.ejsmont.org/blog/