I have a textarea as an input in my HTML form. When any user writes something like following (I am trying to point out the line breaks):
The quick brown fox jumps **over**
the lazy dog
And when it is stored into database and I retrieved it and echo it appears without the line breaks, it looks like following:
The quick brown fox jumps over the lazy dog
Could you please tell me how to display the stored data in just the way it was formatted by the user?
When I display data I just retrieve information from database just the usual way and then just echo it like this– <? echo $value_text ;?>
Thanks in Advance :0
You should do
nl2br()–htmlspecialchars()