FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Question about new lines
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Question about new lines [message #175503 is a reply to message #175489] Mon, 03 October 2011 05:15 Go to previous messageGo to previous message
Gordon Burditt is currently offline  Gordon Burditt
Messages: 2
Registered: March 2011
Karma:
Junior Member
> I come from a scripting background so am not unfamiliar
> with the concept of CR/LF characters. I am in the process
> of learning PHP via the following tutorial

A newline in output interpreted as HTML is rendered no differently
from a space or series of spaces. It shows up as a newline in "view
source" of browsers but not in rendered HTML.

If you want to cause a line break, do it in HTML. <br> and <p> are
commonly used for this. Also, there's <tr> inside tables, which
does a bit more than just a line break.

If you output your text with header("Content-Type: text/plain")
(read the documentation about how to use this: HTTP headers have
to come *before* any text sent to the browser. Even a single space
or newline.) or otherwise get the web server to call it a plain
text file rather than HTML, newlines will be visible.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: comparing dates?
Next Topic: hai
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 03:47:52 GMT 2024

Total time taken to generate the page: 0.05127 seconds