So let's see if I get this right. I type this into the form:

In reply to:

They are two different control characters. Newline, sometimes called Linefeed, is Ctrl-J and Carriage Return is Ctrl-M. In DOS/Windows, text file lines are terminated with a CR/LF combo. In Unix, they're ended with a LF, and in MacOS 9 and prior, they're ended with a CR. Other OSes, I'm sure have similar combinations.

This all harkens back to the day when computers were controlled via teletypes, which were essentially automated typewriters.




Do I need to worry about carraige returns? Can I just use nl2br?

*edit*
Problem: for every <br> the code enters, for some reason it is being printed on the page as two. So if I type something and press return twice, when it prints on the page after being called from the database, it prints 4 new lines!
*edit*


One more string replacement question: is there a way to go through the string and replace links with working links? for example, if someone types in "www.yaho.com", it will store <a href="http://www.yahoo.com">www.yahoo.com</a>


Edited by DiGNAN17 (21/02/2003 16:05)
_________________________
Matt