Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Out put formatting

Status
Not open for further replies.
Apr 16, 2003
117
US
I am just starting with php
i want to format the outputted print text
how do i add blank lines between outputs
do i HAVE to insert html or is there something i am missing?
\n and \r are doing nothing for my output
 
\n\r will affect only source code. they are not html entities.

either control screen format with css or for a quick solution just echo a "<br/>" after your output to create a blankline.
 
\n\r" doesn't mean anything.

"\r\n" (and the order does matter) is used by Microsoft to denote the end of a line. With Unix, it's "\n".

But if you're outputting to an HTML page, the browser will ignore any line breaks unless the text is inside <pre>...</pre> tags.

Or, as jpadie says, you can use <br/> instead.



Want the best answers? Ask the best questions! TANSTAAFL!
 
I would look into CSS (cascading style sheets). But you might have your hands full if you just beginning at PHP.



 
Thanks so much for the help.
both of these options worked.
Yeah style sheet will be the way to go... eventually
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top