Forum Moderators: coopster

Message Too Old, No Replies

Newline doesnt pulled from database

         

Bahtiyar

9:25 pm on Aug 16, 2008 (gmt 0)

10+ Year Member



Hello,

I have problem with pulling data from database.

I have created admin panel and i put one textarea to insert artical to the database, It works great (I also used mysql_real_escape_string for some characters) for example This text:
---------
The TILE64™ processor family slashes board real estate and system cost by integrating a complete set of memory and I/O controllers, thus eliminating the need for an external North Bridge or South Bridge. It delivers scalable performance, power efficiency and low processing latency in an extremely compact footprint.

"In a highly competitive IP Television environment with high bit rates and complex video algorithms one can never have enough computing horsepower. Tilera's high performance and flexibility will enable us to bring new features and reduced costs to our customers."
--------------

Above article looks same in database with 2 different paragraph and space between them when i insert in through textarea.

BUT WHEN I PULL IT ALL TEXT COMES ONLINE IN ONE LINE, WITHOUT SPACE EVEN IT LOOKS IN DATABASE..

However when i pull text into textarea tag, it comes as is like same with 2 paragraph with space..without any problem...

What should i do to print it as is ?

I will be glad if someone can help me...

Bahtiyar

eeek

9:52 pm on Aug 16, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Have you looked at the nl2br() function?

Bahtiyar

10:15 pm on Aug 16, 2008 (gmt 0)

10+ Year Member



Thank you very much friend, it worked..Now it looks great...