Hi
nl2br doesn't seem to work too good for me...
say I have a textarea called "post", I then process the form script thus...
<?
$post=stripslashes($post);
$post=nl2br($post);
?>
Now what I'd hope that would do is to remove the slashes that get added before some symbols (that works great!), and remove the newlines, and replace them with <br> (or as PHP does for some reason <br />.
My problem is this, the new lines are still there, not really a problem, except for when I want to edit my post. I cleverly convert my <br>'s back to \n's to ensure the post gets seen as it should, but because of the non-removal of my \n's, there are double the number of \n's as there should be (as I still have the old \n's and the new ones which are there as a result of the replacement of <br> to \n.
Any idea how to strip all new lines from my post after I've nl2br'ed it?
Many thanks,
ucbones