Forum Moderators: coopster
In one application of mine, I allow the users to add some text (400 chars max). I strip slashes and tags before entering to the database.
In the user-end, they may hover their mouse over some small icon, and the text appear (with a combo of javascript and dhtml) into a nice looking alt-box.
Now the problem: the javascript requires the text to be all in one line. The text may have full html formating but must all be in one line.
*wrong example*
this is
wrong example
*correct example*
this is <br> correct example
How can I do this with php? I can use nl2br() to change the escaping line into a simple <br>, but how can I force the text to appear all in one line?
Hope i made myself clear