• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do I store a line break into a mysql database?

I have a textarea in a form, and I tried to enter this...


This is sample.

and then when I tried to echo the text I get

Hi, This is sample.

How can I manage to have a line break show? Thanks.

You can just insert the text into textarea as it is.
But I suppose you would like to display this text as HTML somewhere, so use nl2br() function.


I was wondering if there is any codeigniter function related to that.

Check Typography Class.
The Typography Class provides functions that help you format text.

Great. Thank you!!!

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.