I want to use PHP and xamp / wamp to do the following task on my computer without the need to upload / download:
I have dozens of TXT files on the computer, each TXT containing only 1 name per line, no dashes, periods,., etc.
I want to do a search, for example, for all people with surname "Silva" in those dozens of files, then PHP would read all the TXT files, move all the names with "Silva" to silva.txt and save the 2 files.
So far I have explained the following: The stop is to get the files and pass in the php by a foreach in each line, add in the database, but before add do a search if already exists the data in the new file, then save the 2 files.
Can anyone give me a light on how to do this?
I confess that I do not understand almost anything about PHP and I'm hitting my head to make this foreach in several files at the same time, create this BD, create a new file, move everything, see if it has repeated, save all files afterwards.
It's complicated to work ....