Whats the quickest way to upload a CSV with PHP whilst removing duplicates (the phone number).
Example:
Kyle,Hudson,447000000000,[email protected],CUST-1,CUST-2,CUST-3
John,Doe,447000000001,[email protected],CUST-1,CUST-2,CUST-3
John,Doe,447000000001,[email protected],CUST-1,CUST-2,CUST-3
Jack,Doe,447000000004,[email protected],CUST-1,CUST-2,CUST-3
Should become:
Kyle,Hudson,447000000000,[email protected],CUST-1,CUST-2,CUST-3
John,Doe,447000000001,[email protected],CUST-1,CUST-2,CUST-3
Jack,Doe,447000000004,[email protected],CUST-1,CUST-2,CUST-3
I know how to upload the CSV ect, I just need to know how to remove the duplicates.
Would I need to create an array or something similar and then use a function like array_unique?
Your help is appriciated :)