therealwesfoster Posted June 18, 2009 Share Posted June 18, 2009 This is a strange problem.. I'm saving data into the DB from a textarea (example: "this is a new line!"). The data has newlines in it (\n or \r\n). In the DB, the newlines are shown on separate lines, but when I load the data from the DB into the textarea, everything is on one line! What's going on there? I did a quick search on google, and people keep bringing up the nl2br function.. that isn't what I need That makes the data look like "this is a<br />new line!" So the newlines ARE THERE! They just don't show in my textareas.. why so? Wes Quote Link to comment https://forums.phpfreaks.com/topic/162712-newlines-in-textarea/ Share on other sites More sharing options...
RussellReal Posted June 18, 2009 Share Posted June 18, 2009 view the html source and see if it still have newlines in teh source.. Quote Link to comment https://forums.phpfreaks.com/topic/162712-newlines-in-textarea/#findComment-858700 Share on other sites More sharing options...
DjMikeS Posted June 18, 2009 Share Posted June 18, 2009 Have you tried setting wrap="physical" in your textarea element ? Quote Link to comment https://forums.phpfreaks.com/topic/162712-newlines-in-textarea/#findComment-858728 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.