I have a table in the database called locations which contains 2 columns(id which is auto incremented , location) , And I have a csv c
locations
id
location
Maybe you should use:
$array = array_map('str_getcsv', file('file.csv'));
You have more option to check variables.