Chaos Project

General => Electronic and Computer Section => Programming / Scripting / Web => Topic started by: jcsnider on December 06, 2009, 08:12:34 pm

Title: Php Code Help
Post by: 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?
Title: Re: Php Code Help
Post by: fugibo on December 06, 2009, 08:14:56 pm
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.
Title: Re: Php Code Help
Post by: jcsnider on December 06, 2009, 08:17:11 pm
Ok I will thanks....