Page 1 of 1

Maintaining text spacing...

Posted: Sun Feb 18, 2007 5:15 pm
by jkashu
I'm trying to display the contents of a text file on webpage. How can I maintain the spacing and line breaks?

Example:
Text file looks like this:
This is just an example.

Thist is just an example.

This just an example.
This how it appears when it is read into the php page:
This just an example. This is just an example. This is just an example.

Posted: Sun Feb 18, 2007 5:16 pm
by feyd
nl2br() may be of interest.

Posted: Sun Feb 18, 2007 5:21 pm
by jkashu
It works perfectly... Thanks so much!