I create a program that read each line of csv file and insert data into database.
My proble is to intercept first line and if the cell contents match certain values can then start the database on insert

for example
colum a,1 value NAME
colum b,1 value CITY
colum c,1 value PHONE

I need to test this:

if ((colum a,1=='NAME') && (colum b,1=='CITY') && (colum c,1=='PHONE')){
..query for insert

My code is something like this:

if (($fp = fopen($new_file, "r")) !== false)

while (($data = fgetcsv($fp, 1000, $delimiter)) !== false) {


$insert=" ... ... ";

but I can't able to add test for first line
I hope it's clear..