PHP script that combines data from two CSV files to produce two new files
There are a few things you should take into account.


You never close your files. At the end, use fclose; 
Use try {...} catch(){} finally {} and close the file(s) in the finally 
Use functions to enhance readability
Do not use die or exit, this kills the script and is bad practise. See this blog post, very valuable
It might be wise to put "magic strings" in a constants file and including this with require - for example your datetime formats, csv columns and so forth. This makes sure that you do not have to edit the script when any of these would change but rather only change the constants.
Comments rot very quickly, any change would leave you with "you have to update the comments too". Don't use comments, in stead use functions that have self explanatory names. i.e. pushCustomerDateToCsvRow(param1, param2,... )