php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #32451 \n, \t doesn't work anymore
Submitted: 2005-03-25 06:47 UTC Modified: 2005-03-26 06:00 UTC
From: arizabo at gmail dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 4.3.10 OS: Windows XP
Private report: No CVE-ID: None
 [2005-03-25 06:47 UTC] arizabo at gmail dot com
Description:
------------
1) upgrade (security patches) mozilla firefox
2) then after some times the \n and \t not working.
3) using echo "test1\n test2"; will give "test1 test2" result without new line.
4) i test the code on both firefox 1.0 and IE 6.0 but the result is same. 

php programming tool: Apache Friends xampp (php4 and 5, mysql,apache, etc) and i use it as it is without any changes.



Reproduce code:
---------------
<?php
echo "test1\n test2\n \ttest3\n";
echo "test4\n"."test5\t"."test6";
?>

Expected result:
----------------
(actual result copy and paste from firefox 1.0)

test1 
test2 
 test3 
test4 
test5  test6

Actual result:
--------------
(actual result copy and paste from firefox 1.0)

test1 test2 test3 test4 test5 test6

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-03-25 08:40 UTC] rasmus@php.net
\n and \t have no meaning in HTML other than being normal whitespace.  If you want a line break, you need to use a <br /> tag.  Do a View Source and you will see that your \n and \t's are working quite nicely.
 [2005-03-26 06:00 UTC] arizabo at gmail dot com
thanks for the fast answer! 

but the one i paste here is from the "Page source" of firefox1.0 and IE6... and that puzle me...

by the way, the problem solve when i shutdown my pc, and then restart it again the next morning...
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun May 05 14:01:31 2024 UTC