Пример:
Файл:
Код: Выделить всё
;12;012345678;"foo\";1;"100 000 000;"
;13;012345679;"bar";1;"100 000 000;"
Код: Выделить всё
(
[0] =>
[1] => 12
[2] => 012345678
[3] => foo\";1;100 000 000
[4] =>
;13;012345679;bar"
[5] => 1
[6] => 100 000 000;
)
Код: Выделить всё
$file = new SplFileObject('1.txt');
$file->openFile();
$file->setCsvControl(';');
while ($str = $file->fgetcsv()) {
print_r($str);
}
Подробнее здесь: https://stackoverflow.com/questions/786 ... -a-cell-en
Мобильная версия