Php Code Help

Started by jcsnider, December 06, 2009, 08:12:34 pm

Previous topic - Next topic

jcsnider

Ok I have a short php code which reads a text file and then displays it... the only thing is, it puts it into one big sentence and dosnt reconize where I hit the enter, or went to the next line...

<?php include("file.txt"); ?>

Anyone know how to fix this?

fugibo

Quote from: jcsnider on December 06, 2009, 08:12:34 pm
Ok I have a short php code which reads a text file and then displays it... the only thing is, it puts it into one big sentence and dosnt reconize where I hit the enter, or went to the next line...

<?php include("file.txt"); ?>

Anyone know how to fix this?


It's not the code which is broken, it's the fact that it's trying to display it in HTML. HTML doesn't recognize linebreaks, you have to manually add

<br />

each time you want to go to the next line.

jcsnider