Forum Moderators: coopster

Message Too Old, No Replies

read text file and parse as HTML

         

ashabi

8:19 am on Sep 1, 2003 (gmt 0)

10+ Year Member



I was able to write a block of text to a text file. I would now like to be able to read it from a different page. The problem is that it is suppose to be formatted with paragraphs and it outputs all these slashes. How do format a text file as html.

Paul in South Africa

8:34 am on Sep 1, 2003 (gmt 0)

10+ Year Member



$text = preg_replace("/(\015\012)¦(\015)¦(\012)/","<br />",$text);

will replace the \r or \n that appear in your page with <br /> tags.