• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

PHP/MySQL question

thirtythree

Diamond Member
Is there any way to have the formatting show up when retrieving text from a database and displaying it on a page? Replacing the line breaks with "< br >" when the text is inserted into the database would work but I don't know how to do that either. Umm .. hopefully someone can figure out what I'm talking about. Thanks.
 
You could use a simple str_replace("\n", "< br >"), but php even has a function called nl2br() that does that. (ignore spaces in the br tag)
 
Back
Top