How to Practically Split Values from CSV File into MySQL Database
- by Ryan
Let's suppose I have the following line in a CSV file (I removed the header row in this example):
"500,000",2,50,2,90000
I have a PHP script read the CSV file, break the file into individual lines, and store each line in an array called $linearray. Then, I use a foreach loop to look at each line individually.
Within the foreach loop, I break…