vikaspa Posted April 19, 2008 Share Posted April 19, 2008 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 More sharing options...
haku Posted April 19, 2008 Share Posted April 19, 2008 Look at nl2br. Its what you need. Link to comment https://forums.phpfreaks.com/topic/101824-vaues-displayed-in-tex-area/#findComment-521052 Share on other sites More sharing options...
Barand Posted April 19, 2008 Share Posted April 19, 2008 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() Link to comment https://forums.phpfreaks.com/topic/101824-vaues-displayed-in-tex-area/#findComment-521093 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.