Total Complexity | 1 |
Total Lines | 30 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
5 | class CSV extends TextFile |
||
6 | { |
||
7 | |||
8 | |||
9 | // T — Gets line from file pointer and parse for CSV fields |
||
10 | // fgetcsv ( resource $handle [, int $length = 0 [, string $delimiter = "," [, string $enclosure = '"' [, string $escape = "\\" ]]]] ) : array |
||
11 | |||
12 | // fputcsv ( resource $handle , array $fields [, string $delimiter = "," [, string $enclosure = '"' [, string $escape_char = "\\" ]]] ) : int |
||
13 | /* |
||
14 | <?php |
||
15 | |||
16 | $list = array ( |
||
17 | array('aaa', 'bbb', 'ccc', 'dddd'), |
||
18 | array('123', '456', '789'), |
||
19 | array('"aaa"', '"bbb"') |
||
20 | ); |
||
21 | |||
22 | $fp = fopen('file.csv', 'w'); |
||
23 | |||
24 | foreach ($list as $fields) { |
||
25 | fputcsv($fp, $fields); |
||
26 | } |
||
27 | |||
28 | fclose($fp); |
||
29 | |||
30 | |||
31 | */ |
||
32 | function array() : array |
||
37 |