Hello Chris, Don't know how I did that but it worked strange. Maybe the reason I am getting the extra line is because I am testing the script on Windows 200 and not on a good Linux box.
Wednesday, March 5, 2003, 1:37:43 PM, you wrote: CW> On Wed, 5 Mar 2003, Richard Kurth wrote: >> This script will remove a line from a text list of email address and >> then re-write the list. The only problem I am having is when it >> re-writes the list it adds a extra line between each record. How can I >> stop this from happening CW> Your code works as you'd expect ... on my mod_php 4.2.2 & Apache 1.3.26 CW> setup. It's amazing though, because implode() is used incorrectly. CW> See below: >> $recordsarray = file($members); >> $remove = "[EMAIL PROTECTED]"; >> $temp = array(); >> for ($i=0;$i<count($recordsarray);$i++) >> { >> if (!strstr($recordsarray[$i], $remove)) >> { >> $temp[] = $recordsarray[$i]; >> } >> } >> $recordsarray = $temp; >> $lines = implode($recordsarray,''); CW> The above line: CW> I'm assuming you want to collapse $recordsarray into a sting, with the CW> elements of $recordsarray separated by a null char. Well, you told CW> implode() to collapse a null char into a string with the elements of null CW> char separated by $recordsarray ... inverted the arguments to implode(). CW> I have no idea why an error isn't raised instead of kind-of working, but CW> anywho .... CW> Try switching the arguments around in the call to implode(), to: CW> $lines = implode('',$recordsarray); CW> http://www.php.net/manual/en/function.implode.php CW> If that doesn't correct the problem you're experiencing, let us know. CW> I have other ideas for you, but they may not be necessary if that solves CW> it. CW> HTH, CW> ~Chris -- Best regards, Richard mailto:[EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php