Re: Kill all line brk's and white space on output?

From: Date: Thu, 09 Aug 2001 20:51:53 +0000
Subject: Re: Kill all line brk's and white space on output?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-62076@lists.php.net to get a copy of this message
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 richard@zend.com address is an endangered species -- Use ceo@l-i-e.com 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 <marcus@mjchristianunlimited.com> Newsgroups: php.general To: <php-general@lists.php.net> 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 > >

« previous php.general (#62076) next »