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 Quote Link to comment Share on other sites More sharing options...
haku Posted April 19, 2008 Share Posted April 19, 2008 Look at nl2br. Its what you need. Quote Link to comment 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() Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.