I have a text area that inserts its contents into an SQL table. Is there a way to keep the formatting of the text and then use it in HTML?
If you want Enters to replace char 10 and char 13 with <br />
When using SQL (pay attention to input)
select replace(' test test',' ','<br/>')
The result is <br/>test<br/>test
<br/>test<br/>test
I assume that you are talking about keeping line breaks.
Or:
Print text inside the <pre> tag
or
Converting line feed strings to tags before inserting into the database. (For example, nl2br in PHP).
- . , , .
... ?
Source: https://habr.com/ru/post/1750670/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1750665/user-must-have-accepted-tos-facebook-graph-api-error-when-posting-photos-to-group-page&usg=ALkJrhjk5H7aRuvjq8vPPaowyN7hGcMeWAAn open source open source software modem that runs on Linux? - c ++PHP echo xyz if lines in a loop do not contain data - phpDifferences in the Add Link dialog box depending on your .Net environment? - referenceDetecting which version of SSL and TLS and ciphers were negotiated by the browser - browserHow to get an array of strings from a list >? - genericsYAGNI and database creation scripts - databaseTag Search in SharePoint 2010 - sharepointjQuery && Google Chrome - jqueryHeroku app throws "Internal Server Error" - ruby | fooobar.comAll Articles