New Line special character CRISIS!

admin

Administrator
Staff member
Please help me. <br />
<br />
I have written a discussion board that accepts text from a user and saves it to a sql database. <br />
<br />
When the data is sent from the clients browser to the server it performs the following functions:<br />
<br />
reply1 = replace(reply1,"'","''") <br />
reply1 = replace(reply1,". ",".<br>")<br />
reply1 = replace(reply1,"; ",";<br>")<br />
reply1 = replace(reply1,"? ","?<br>")<br />
reply1 = replace(reply1," ","<br><br>")<br />
reply1 = replace(reply1,"??????","<br><br>")<br />
<br />
obviously to do all the neccessary changes so that when it gets displayed it will be displayed like it was written. <br />
I can't get a "\n" character or line break or new paragraph to work. Please help. I am in deep crap if it does not work soooon.<br />
<br />
Please help me to figure out what I am supposed to enter in the space of the '???????' to get it replaced with <br><br> or </p>.<!--content-->Are you trying to make the text have the line breaks that it had when input?<br />
<br />
If so, have you tried the nl2br() function?<br />
<br />
nl2br($data);<br />
<br />
I'm kinda assuming your using PHP here by the way! :)<!--content-->
 
Back
Top