Hi there Mr. Cytek,
So, the script subtracts the numbers from file2 from numbers from file1.
The resulted file will be: file1 - file2
It's a matter of arrays manipulation.
Lines are read in arrays and script eliminates from array1 numbers in array2. Resulting array will be written to file3 and it will contain array1 - array2.
Basically, the script will be simple and fast but speed will depend on the file length.
The longer the file, the longer the time to process.
It's basic php functions (builtin) so speed will only depend on the file length.
I can finish it tonight and deliver the script in the morning.
Regards,
Calin.
PS: script 2 is even easier, it's just a matter of looping through an array and concatenating the number (30 in your example) to each row.