php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9542 \n not forcing a new line.
Submitted: 2001-03-04 02:25 UTC Modified: 2004-04-09 19:27 UTC
From: davidlbarber at home dot comEch Assigned:
Status: Closed Package: Strings related
PHP Version: 4.0.4pl1 OS: Corel Linux 1.1.2
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: davidlbarber at home dot comEch
New email:
PHP Version: OS:

 

 [2001-03-04 02:25 UTC] davidlbarber at home dot comEch
<?php		echo "Some String \n"
		echo "Some more String \n"
					?>
I expected this output:

Some String
Some more String

But I'm getting this output:

Some StringSome more String

No new line is being forced. The problem also occurs with PRINT
 as well as ECHO.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-03-04 12:10 UTC] cynic@php.net
are you looking at it in a browser? if so, look at the source of the page. the newline is there. if not, reopen the report.
 [2004-04-09 16:23 UTC] cperrywebrat at yahoo dot com
I also do not get a new line using this:
<?php
     echo('<BR>Number of \r\nrecords f\rou\nnd: '.$counter);
?>

Yes, I am looking at this in a browser.  Is there maybe a configuration setting not allowing this?
 [2004-04-09 19:27 UTC] tomsommer@php.net
cperrywebrat at yahoo dot com:

Read the documentation, http://php.net/manual/en/language.types.string.php

Not a bug.
Please don't comment on old and closed bugs, create a new one - after doublechecking the manual
 [2011-02-12 19:56 UTC] dwurry at gmail dot com
To print a newline in the browser ad a <p> tag to create a new paragraph.  Like 
this:   

echo ("<p>The sql is: ".$sql);

You can close it too if you like....  echo("</p>");
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Dec 26 13:01:30 2024 UTC