All,
I am using the fgets routine to retrieve text from a file I wrote with VI and dumping into an HTML form.
The basic problem is that (for whatever reason), when I echo out the results, the damn text shows up as one long line without the proper new lines.
SO, using FGETS, how can I look for newlines (carriage returns) to issue a <BR> in my html source?
Example :
textfile.txt
This is what is in my text file.
- It has two lines
- No, wait - it has three lines.
When I execute my HTML page to retreive the data from my testfile.txt, it shows up as :
This is what is in my text file.- It has two lines-No, wait - it has three lines.
-- Cobain was murdered.