[PHP] Re: extra breaks in sent out emails

2004-03-07 Thread Ben Ramsey
I cannot believe that the server converts \r's to \n's. \n does not count as two breaks, either. \r stands for carriage return and \n stands for newline. Even if they are placed side-by-side (e.g. "\r\n"), they should only count as one line. Unless I knew more about your code or your applic

[PHP] Re: extra breaks in sent out emails

2004-03-07 Thread Scott Taylor
Thank you Ben. Using either str_replace("\n", "", $string); or str_replace("\r", "", $string); solves the problem. My guess is that when I submit the data there is both the \r and the \n in there (for there showed 2 white space characters in between the broken text lines). My guess is that t

[PHP] Re: extra breaks in sent out emails

2004-03-07 Thread Ben Ramsey
Scott Taylor wrote: What I really don't understand is why there are any line breaks at all, because the trim is supposed to take out all \r & \n 's. Is there another type of line break? trim() actually only strips whitespace (including \r and \n) from the beginning and ending of strings. See h

[PHP] Re: extra breaks in sent out emails

2004-03-06 Thread Scott Taylor
on Page One a b On Page Two: $to = $row['email_address']; $body = stripslashes(trim($_POST['email_body'])); mail($to, $subject, $body, $headers); What I really don't understand is why there are any line breaks at all, because the trim is sup

[PHP] Re: extra breaks in sent out emails

2004-03-06 Thread Ben Ramsey
Could you post the code you're using to write your $_POST variable to the e-mail message? I seem to remember coming across a problem like this in the past, and I'd like to see your code to see if it jogs my memory. Thanks. BTW, it shouldn't have anything to do with the fact that you're enterin