RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Ken Robinson
At 05:35 PM 12/27/2005, Wagner, Aaron wrote: k, I didn't see you filehandle on the fwrite. I didn't know that you could write to the same file your reading? Interesting Actually, I use the file() function to read the whole file into an array, so the file isn't open when you do the fopen() of

RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Wagner, Aaron
n [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 27, 2005 5:05 PM > To: users@httpd.apache.org > Subject: RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File > > Quoting "Wagner, Aaron" <[EMAIL PROTECTED]>: > > > That's nice but it doesn'

Re: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Boysenberry Payne
Try: $string = file_get_contents( "test.text" ); $string = file_put_contents( "test.text", preg_replace( "/(\r\n|\r|\n)(\s)*(\r\n|\r|\n)/", "$1", $string ) ); Boysenberry boysenberrys.com | habitatlife.com | selfgnosis.com On Dec 27, 2005, at 3:16 PM, Christopher Deeley wrote: Does anyone

RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Ken Robinson
Quoting "Wagner, Aaron" <[EMAIL PROTECTED]>: That's nice but it doesn't fix the blank lines it just skips them in the file parse. I think he wants to clean the file. If the file gets big, he could take a performance hit skipping multiple lines. If you ran the script you would see that the ou

RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Wagner, Aaron
Operations 804.515.6298 > -Original Message- > From: Ken Robinson [mailto:[EMAIL PROTECTED] > Sent: Tuesday, December 27, 2005 4:54 PM > To: users@httpd.apache.org > Subject: Re: [EMAIL PROTECTED] Delete Blank Lines In A Text File > > Quoting Christopher Deeley <[EMA

Re: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Ken Robinson
Quoting Christopher Deeley <[EMAIL PROTECTED]>: Does anyone know how to use PHP to delete blank lines in a text file. I use a text file to store usernames and passwords but with adding and deleting users, blank lines appear which returns an undefined offset error when the 'verify user script' tr

RE: [EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Wagner, Aaron
TED] Delete Blank Lines In A Text File Does anyone know how to use PHP to delete blank lines in a text file. I use a text file to store usernames and passwords but with adding and deleting users, blank lines appear which returns an undefined offset error when the 'verify user s

[EMAIL PROTECTED] Delete Blank Lines In A Text File

2005-12-27 Thread Christopher Deeley
Does anyone know how to use PHP to delete blank lines in a text file. I use a text file to store usernames and passwords but with adding and deleting users, blank lines appear which returns an undefined offset error when the 'verify user script' tries to read each line of the text file.   Thanks