- fputcsv: documentation ( source)
- print_r: documentation ( source)
- fgetcsv: documentation ( source)
- fclose: documentation ( source)
- fgets: documentation ( source)
- rewind: documentation ( source)
- fopen: documentation ( source)
<?php
$data = [
0 => "10BR1\"5560R1\\\"0050T-5050",
28 => '7|2,48',
54 => '13 800',
57 => "38\t,00"
];
$fp = fopen('php://memory', 'r+');
fputcsv($fp, [$data[0], $data[54], $data[57], $data[28] . '.jpg'], '|');
rewind($fp);
echo fgets($fp);
rewind($fp);
print_r(fgetcsv($fp, 1024, '|'));
fclose($fp);