CSV importer with field mapping
Anyone know of a good csv importer script or class i can use to integrate into my web app. Am looking to allow my users to import data from a csv file to mysql database.
Also if possible to allow them field mapping. Appreciate if someone can guide me to a script, class or paid script. Couldnt find anything suitable on codecanyon.
Thanks in advance 🙏
11 comments · 83% upvoted · other discussions
I'd recommend https://packagist.org/packages/league/csv. You can find docs/examples here https://csv.thephpleague.com/.
RealWorldPHP 3 points · Apr 2023
This. The League has a lot of great packages, and it would be the first place I would look. If the OP wants an out-of-the-box solution that will fit their exact situation, then it will be very difficult to find anything suitable. But it can be coded to work for any CSV issue using this package.