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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting Line breaks in HTML Source Code 1

Status
Not open for further replies.

bam720

Technical User
Sep 29, 2005
289
US
Im kinda a neat freak about my whitespace in code. I really like it. In doing some work on my website I found that all my HTML was being put on one line (now 6). This is a pain to debug. Any ideas?

-- is the page in particular
 
add '\r\n' in your php code where you want whitespace in the source.

or consider using the heredoc syntax (have a look in the manual if you don't know).

or you could do this

Code:
echo '

<table>
  <tr>
    <td>cell 1</td>
    <td>cell 2</td>
  </tr>
</table>
';

i.e. spread out the source inside your quotes.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top