I am using php5. I am doing a form, a textarea, where user can send it to his/her friends. But currently, in my textarea form, if i type :
Hello XXX,
Its been a while. How are you?
But when I echo it, it displays
Hello XXX, Its been a while. How are
you?
How do I accept the enter button, so that when I display I can display like:
Hello XXX,
Its been a while. How are you?
There is a function called nl2br() which converts newlines
\nto html friendly line breaks.<br>or<br />It’s used like this
This will output
Since HTML is markup based, you will need some markup to tell the browser that you want a linebreak.
The reason is that
Is the exact same thing as