[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-doc-bugs
Subject:    [DOC-BUGS] #44276 [Opn]: nl2br function doesn't work as described
From:       philip () php ! net
Date:       2008-02-28 0:37:58
Message-ID: 200802280037.m1S0bwjF072692 () y1 ! php ! net
[Download RAW message or body]

 ID:               44276
 Updated by:       philip@php.net
 Reported By:      lokitek at gmail dot com
 Status:           Open
 Bug Type:         Documentation problem
 Operating System: el5
 PHP Version:      Irrelevant
 New Comment:

Please run this code and print its output here:

<?php
phpinfo(INFO_GENERAL);
echo "\n\n<br />\n\n";
var_dump( nl2br("foo isn't\n bar") );
?>

If something sensitive appears in there, remove it first.



Previous Comments:
------------------------------------------------------------------------

[2008-02-28 00:10:42] lokitek at gmail dot com

Description:
------------
Using the example supplied of:

echo nl2br("foo isn't\n bar");

My php 5.1.6 is actually echoing out:
foo isn't<br> bar

This is NOT xhtml compliant since it's suppose to be <br />

Anyone experienced this?


extra info:
PHP 5.1.6 (cli)

Reproduce code:
---------------
echo nl2br("foo isn't\n bar");

Expected result:
----------------
foo isn't<br /> bar

Actual result:
--------------
foo isn't<br> bar


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=44276&edit=1

-- 
PHP Documentation Bugs Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic