Crazydog
03-03-2007, 07:30 AM
I currently accept user input so they can create profiles, and have some information about themselves.
I'm running the nl2br function on the input, so it is viewed correctly when echoed.
I'm using str_replace to switch it back to \n (since i strip all <'s and >'s in their input), but the \n's are twice the spacing of the <br />'s
When they edit their profile, I would like to reverse the process, but only show one \n per every two <br />'s, even if they are on separate lines.
How would I do that?
I'm running the nl2br function on the input, so it is viewed correctly when echoed.
I'm using str_replace to switch it back to \n (since i strip all <'s and >'s in their input), but the \n's are twice the spacing of the <br />'s
When they edit their profile, I would like to reverse the process, but only show one \n per every two <br />'s, even if they are on separate lines.
How would I do that?