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

#1
[eluser]Kibret[/eluser]
I have a textarea in a form, and I tried to enter this...

eg:

Hi,
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.

#2
[eluser]bitist[/eluser]
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.

#3
[eluser]Kibret[/eluser]
Thanks.

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

#4
[eluser]bitist[/eluser]
Check Typography Class.
The Typography Class provides functions that help you format text.

#5
[eluser]Kibret[/eluser]
Great. Thank you!!!


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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