Jump to content

Looking for simple solution to "styling" html source code...


cgm225

Recommended Posts

I have a notes/blog app I coded in which (1) I grab an entry from a database, then (2) use the nl2br() function on the body of the entry, followed by (3) outputting of the that text (now with html BR tags).  However, as seen here for example (see the html source code), using the nl2br() function messes up my nice HTML source code organization (i.e. the uniform indenting of the code, etc).  Therefore, I wanted to know if there was another way to insert html BR tags for carriage returns within the body of my note entries when outputting them so that there will not also be inserted a break in the html source code (i.e. essentially a \n after the break, which I don't want).

 

Basically, I want my source code to look pretty again, and nl2br is messing it all up...

 

Any ideas?  Looking for a simple solution here.

 

Thanks again!

 

note, by BR tags I mean <br />

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.