changing \n to <br>

I have a page in which user can enter text which is saved to file and then shown on html page.
The text is saved as text.
I would like to convert to html (the returns to <br> etc.) so it will look right on the html page.
Thanks for any help.
Jim
JStanAsked:
Who is Participating?
 
ozoConnect With a Mentor Commented:
s/\n/<br>/g;
0
 
JStanAuthor Commented:
That was easy.
Thanks,
Jim
0
All Courses

From novice to tech pro — start learning today.