preg_replace($pattern, $replacement,
$string);
preg_replace("/\n\r *\n\r/","\n\r",
$string )
\n\r *\n\r - for a windowz maching and they may be in
the wrong order.
Your basically replacing all double linefeeds with a
single linefeed.
Replace the \n\r with whatever your OS uses as a
linefeed.

Thanx
Aaron N
Wagner
Monitoring Systems and Network
Tools
CCO-Command Center Operations
804.515.6298
From: Christopher Deeley [mailto:[EMAIL PROTECTED]
Sent: Tuesday, December 27, 2005 4:17 PM
To: users@httpd.apache.org
Subject: [EMAIL PROTECTED] Delete Blank Lines In A Text FileDoes 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