Next Line for text area in php
I am storing a some text from a text area into php.
When I press Enter in text area,The text do come into next line(looks good
for formatting), but when submitted to database and retrieved, it appears
that all text comes in a single line.
Example:Entered Text is
This is first line. This is second line.
And Retrieved output is:
This is first line.This is second line.
In stack overflow,double space is treated as \n. it can be done by
replacing double space by \n using preg_replace or through javascript, but
can it be done direclty if user press enter ?
So how to enable next line character(\n) for the text area so that it
displays the format in which it was entered.Similarly I want to enable ,
and tag as well to enhance formatting in entered data.
No comments:
Post a Comment