How to do checking before importing a CSV file in PHP?
I have a CSV file which contains the information with the columns id, name, telephone, email
and have the database with the same columns. I have the PHP file which can import the CSV file into the database.
Now, I want to update the information by batch, how can I match the id, name between CSV file and database so as to avoid wrong data input (suppose the data in the database is correct but that in the CSV it is wrong).
At the end, the PHP can show the message that your CSV data is incorrect! Thanks! Anyone can help?