• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
text from database was not diplayed properly in view file.

#1
[eluser]Mari[/eluser]
Hi, friends
I stored some text data in my db by submit a form.
In my form I entered the text in textarea like,

<b>1.sample text sample text.
2.sample text sample text.
3.sample text sample text.
4.sample text sample text.
5.sample text sample text.</b>

But when I get that text and displayed in view file it shows like,

<b>1.sample text sample text.2.sample text sample text.3.sample text sample text.
4.sample text sample text.5.sample text sample text.</b>

how I can display the text in right format.

#2
[eluser]Aken[/eluser]
http://us2.php.net/manual/en/function.nl2br.php

#3
[eluser]Mari[/eluser]
Thanks Aken.


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


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