Jump to content

vaues displayed in tex area


vikaspa

Recommended Posts

I am displaying details stored in database as follow

 

<textarea name="bizdesc" cols="50" rows="5" class="input" id="bizdesc"><?php echo  $rows['bizdesc'] ; ?></textarea>

 

The details are entered as

 

text 1

text 2

text 3

 

But displayed as

 

text 1 text2 text3

 

How can I display this in original format i.e. one below the other

 

i.e.

text 1

text 2

text 3

 

 

PLEASE PEASE HELP

Link to comment
https://forums.phpfreaks.com/topic/101824-vaues-displayed-in-tex-area/
Share on other sites

If the text was originally entered as

Text 1

Text 2

Text 3

 

and stored with the original linefeeds then it should display exactly the same way in the textarea when you pull it from the db for editing.

 

If you want to display it as body text on a page, then you use nl2br()

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.