"file" already returns an array so this would be best for that :).
Thomas On Wed, 22 Jan 2003 14:00:09 +0000 [EMAIL PROTECTED] (Didier McGillis) wrote: > > Cool I'll report back what I have found. Question. I have tried fopen and > file and was wondering for opening the file and loading it into an array > which one is better? > > > > > > > >From: "Timothy Hitchens \(HiTCHO\)" <[EMAIL PROTECTED]> > >Reply-To: <[EMAIL PROTECTED]> > >To: "'Didier McGillis'" <[EMAIL PROTECTED]>, > ><[EMAIL PROTECTED]> > >Subject: RE: [PHP] HELP please quickly > >Date: Wed, 22 Jan 2003 23:26:10 +1000 > > > >You first file just requires loading into an array and you can use > >unique array functions to remove > >duplicates etc.. > > > >The other files simply load into an array and use preg to strip out what > >you want and follow the same > >checking and removal of duplicates. > > > >Checkout: preg_match and array functions in the www.php.net manual. > > > > > > > >Timothy Hitchens (HiTCHO) > >Open Source Consulting > >e-mail: [EMAIL PROTECTED] > > > > > -----Original Message----- > > > From: Didier McGillis [mailto:[EMAIL PROTECTED]] > > > Sent: Wednesday, 22 January 2003 11:22 PM > > > To: [EMAIL PROTECTED] > > > Subject: [PHP] HELP please quickly > > > > > > > > > Here is a brief description of what I want to do. I want to > > > use PHP to grab > > > a list of numbers in one file. Check it against a bigger > > > file and strip the > > > ones that match out of the bigger file, into a "holding" file. > > > > > > > > > so here is what it might look like. > > > > > > file1.txt > > > 456789 > > > 456790 > > > 456791 > > > 456792 > > > 456793 > > > 456794 > > > ..... > > > > > > file2.log > > > some time stamp code=001;number=456784;name=blahblah;date=012403; > > > some time stamp code=001;number=456785;name=blahblah;date=012403; > > > some time stamp code=001;number=456786;name=blahblah;date=012303; > > > some time stamp code=001;number=456789;name=blahblah;date=012503; > > > some time stamp code=001;number=456789;name=blahblah;date=012503; > > > some time stamp code=001;number=456789;name=blahblah;date=012503; > > > some time stamp code=001;number=456789;name=blahblah;date=012503; > > > some time stamp code=001;number=456789;name=blahblah;date=012503; > > > some time stamp code=001;number=456790;name=blahblah;date=012603; > > > some time stamp code=001;number=456791;name=blahblah;date=012703; > > > > > > notice there might be more then one of the same number, I > > > only need one so I > > > need to ignore the rest, rip out the time stamp, which is a > > > seperate line. > > > > > > file3.txt > > > code=001;number=456789;name=blahblah;date=012503; > > > code=001;number=456790;name=blahblah;date=012603; > > > code=001;number=456791;name=blahblah;date=012703; > > > > > > can anyone help, any suggestions? > > > > > > > > > > > > > > > > > > _________________________________________________________________ > > > MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. > > > http://join.msn.com/?page=features/virus > > > > > > > > > -- > > > PHP General Mailing List (http://www.php.net/) > > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > > _________________________________________________________________ > Add photos to your messages with MSN 8. Get 2 months FREE*. > http://join.msn.com/?page=features/featuredemail > -- Thomas Seifert mailto:[EMAIL PROTECTED] http://www.MyPhorum.de -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php