Welcome Guest, Not a member yet? Register   Sign In
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!!!




Theme © iAndrew 2016 - Forum software by © MyBB