|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2008-02-28 00:10 UTC] 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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Tue Jun 16 01:00:01 2026 UTC |
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.