@@ -552,25 +552,25 @@ |
||
552 | 552 | /** |
553 | 553 | * Формирование правильной CSV строки |
554 | 554 | * |
555 | - * @see: https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
555 | + * @see: https://stackoverflow.com/questions/3933668/convert-array-into-csv |
|
556 | 556 | * @param array $data Массив с данными |
557 | 557 | * @return string |
558 | - */ |
|
559 | - function make_csv($data){ |
|
560 | - // Create a stream opening it with read / write mode |
|
561 | - $stream = fopen('data://text/plain,' . "", 'w+'); |
|
558 | + */ |
|
559 | + function make_csv($data){ |
|
560 | + // Create a stream opening it with read / write mode |
|
561 | + $stream = fopen('data://text/plain,' . "", 'w+'); |
|
562 | 562 | |
563 | - // Iterate over the data, writting each line to the text stream |
|
564 | - fputcsv($stream, $data); |
|
563 | + // Iterate over the data, writting each line to the text stream |
|
564 | + fputcsv($stream, $data); |
|
565 | 565 | |
566 | - // Rewind the stream |
|
567 | - rewind($stream); |
|
566 | + // Rewind the stream |
|
567 | + rewind($stream); |
|
568 | 568 | |
569 | - // You can now echo it's content |
|
570 | - $out = stream_get_contents($stream); |
|
569 | + // You can now echo it's content |
|
570 | + $out = stream_get_contents($stream); |
|
571 | 571 | |
572 | - // Close the stream |
|
573 | - fclose($stream); |
|
574 | - return $out; |
|
575 | - } |
|
572 | + // Close the stream |
|
573 | + fclose($stream); |
|
574 | + return $out; |
|
575 | + } |
|
576 | 576 | } |
577 | 577 | \ No newline at end of file |