php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #33848 New line problem
Submitted: 2005-07-25 01:28 UTC Modified: 2005-07-25 01:33 UTC
From: pperna at centrum dot cz Assigned:
Status: Not a bug Package: Output Control
PHP Version: 4.3.11 OS: Windows 2000
Private report: No CVE-ID: None
 [2005-07-25 01:28 UTC] pperna at centrum dot cz
Description:
------------
I find out that PHP has big differencies between
" and '(on PHP website, I think). It is very important and many newbies are very confused.I wanted to find some solution for inserting new line into text documents produced by PHP.I found tons of questions about new line feeds doesnt work for me.But solution is very easy.

YOU HAVE TO DO : $output = "text\r\n";
INSTEAD OF $output = 'text\r\n';

Reproduce code:
---------------
$output2 = 'textfirst\r\ntextsecond';



Expected result:
----------------
textfirst
textsecond

Actual result:
--------------
textfirsttextsecond

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-07-25 01:33 UTC] johannes@php.net
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

. 
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 18:01:34 2024 UTC