I have a database query that displays a string:
db.query.record
"This is a string"
I want the string to be read:
"This
is
a
string"
the code i used was db.query.record.replace(" ", "<br />")
and the results i got were:
"This
<br>
is<br>
a<br>
string"
What i understand is, the replace
syntax is storing the html tag in the database string before it is read. After it is read, anything inside the string is displayed just as it is stored (as a string). I need the html to bypass the string, and fetch the html tag, and perform the action.
Suggestions, ideas? I've tried everything... and all results i've tried were done to the text string... and not to the actual html. Be mindful that i dont need this to affect the entire document, just the queried data. I need it to be multi-line, because the data is making my page disorganized (text vary in lengths and size)
If there are any answers that cover the topic Literals
or LiteralsControl
can you please include extra details, cause either i dont understand enough or it, or i was doing it wrong. Internet queries does not provide enough understanding for me.
I want to perform the complete opposite of this request: overflow-link
db.query.record.replace(" ", "
`. (it's a name/title, and i want it to be multi-line). – user3681384 Jul 15 '15 at 21:38")