Re: HELP please quickly
| From: | Rick Emery | Date: | Wed, 22 Jan 2003 13:45:20 +0000 |
| Subject: | Re: HELP please quickly | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-132647@lists.php.net to get a copy of this message | ||
Are the numbers coming from a mysql database? If so, mysql can handle this chore.
----- Original Message -----
From: "Didier McGillis" <codesmoker@hotmail.com>
To: <php-general@lists.php.net>
Sent: Wednesday, January 22, 2003 7:21 AM
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