Innerhtml Linebreaks With A String That Is Very Long With Line Breaks, Coming From A Mysql Query
I have a for loop in which I am printing out content on a web page. Anything with a line break in the database will not work with innerHTML. Here is the process of how to get a st
Solution 1:
Use following functions:
htmlentities
:Convert all applicable characters to HTML entitiesnl2br
Inserts HTML line breaks before all newlines in a string
Or maybe change your sql query with TRIM function as used in link
Post a Comment for "Innerhtml Linebreaks With A String That Is Very Long With Line Breaks, Coming From A Mysql Query"