I want to change new lines in text area to <br> tags BUT I need the final string to be one-line text. I tried using nl2br function but as a result I get string ...
Converting <br /> into a new line for use in a text area In PHP, you can use the nl2br() function to convert line breaks ( -n or -r-n ) to <br /> tags.