I have a very curious issue whith fgtcsv(). Look at this code
$csv_check = fopen(CSV_DIR.$this->db_table.".csv","r");
$data = fgetcsv($csv_check, 1000, $this->fields_terminated_by);
fclose($csv_check);
A print_r($data) outputs the following:
array (
0 => '"program_id"',
1 => 'program_name',
2 => 'program_logo',
)
Curiously, $data[0] is double-quoted here... The original line in this CSV file looks like this:
"program_id";"program_name";"program_logo"
I don't get it at all... Counting the chars of $data[0] with strlen($data[0]) returns 15, even if wrongly quoted, it must be 12 chars... I'm very stunned...!
Any ideas?!?