needs_upgrade Posted October 30, 2008 Share Posted October 30, 2008 Hello guys. I have a string of characters in my mysql table (together with the newlines, multiple spaces, etc). I wanted to show the strings in HTML exactly how the user entered it. I used ereg_replace to replace '\n' with '<br>', multiple spaces with ' ' and tab with five ' '. My problem is with '\n'. It omits the letter n followed by the character new line. How should i do it? thanks guys Quote Link to comment Share on other sites More sharing options...
JasonLewis Posted October 30, 2008 Share Posted October 30, 2008 Look into nl2br() to convert new line characters to HTML line breaks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.