faqts : Computers : Programming : Languages : PHP

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

50 of 92 people (54%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

Line breaks in a PHP script

Jun 26th, 2004 00:42
Philip Olson, hidden brains, Dave, Walt Disney,


You can indicate a line break in PHP with \n as the \n will be 
replaced by a new line in the source code of the executed 
script.
If you're concerned with why this "isn't showing up in HTML" then 
read these faqts:
  how do I insert a new line using "echo"?
  --------------------------------------------------------------
  http://www.faqts.com/knowledge_base/view.phtml/aid/901
  Why does the echo command not give a line break in the browser
  output for \n?
  --------------------------------------------------------------
  http://www.faqts.com/knowledge_base/view.phtml/aid/1046/fid/2