If you use fputs() you will be adding a blank line.
If you use fwrite() you won't.
If you want to suck in the file and remove line breaks, just use:
$text = str_replace("\n", '', $text);
--
WARNING [EMAIL PROTECTED] address is an endangered species -- Use
[EMAIL PROTECTED]
Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm
Volunteer a little time: http://chatmusic.com/volunteer.htm
----- Original Message -----
From: Marcus James Christian <[EMAIL PROTECTED]>
Newsgroups: php.general
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 07, 2001 4:34 PM
Subject: Q: Kill all line brk's and white space on output?
> Hello,
>
> I've got this cool auto add email mailing list that is simply a .txt
> file that PHP writes to.
>
> So the visitor goes to a form types in their email addy and is
> automatically added to the .txt file which is then read when the boss
> wants to send out to the entire list.
>
> This thing works perfectly except for one prob.
>
> Every time some one adds them self to the list (mainly me testing right
> now) their addy is added on the next line down yet when I view the code
> I have NO \r or \n asking to add a line break.
>
> So my question is
>
> Is there a way to say ..."Write to the file emailaddys.txt and suck out
> all line breaks, returns, and white space?"
>
> i.e. make sure each address butts itself up against the next with just
> the comma separating them.
>
>
> I know this would work because when I manually go to the .txt file and
> delete the white space till all the email addy's are back to back this
> app works great!
>
> Thank you in advance my friends
> -Marcus
>
> --
> Marcus James Christian -- UNLIMITED
> Multimedia Internet Design
> http://mjchristianunlimited.com
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]