Jump to content

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/162712-newlines-in-textarea/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.