Subversion-Projekte lars-tiefland.php_share

Revision

Details | Letzte Änderung | Log anzeigen | RSS feed

Revision Autor Zeilennr. Zeile
1 lars 1
--TEST--
2
File_CSV Test Case 008: Various different lines.
3
--FILE--
4
<?php
5
// $Id: 008.phpt,v 1.2 2007/05/11 21:49:01 cipri Exp $
6
/**
7
 * Test for:
8
 * - parsing, separators within quotes
9
 * data gotten from http://www.creativyst.com/Doc/Articles/CSV/CSV01.htm
10
 */
11
 
12
require_once 'File/CSV.php';
13
 
14
$file = dirname(__FILE__) . '/008.csv';
15
$conf = File_CSV::discoverFormat($file);
16
 
17
 
18
$data = array();
19
while ($res = File_CSV::read($file, $conf)) {
20
    $data[] = $res;
21
}
22
 
23
print "Data:\n";
24
print_r($data);
25
print "\n";
26
?>
27
--EXPECT--
28
Data:
29
Array
30
(
31
    [0] => Array
32
        (
33
            [0] => Joan the bone, Anne
34
            [1] => Jet
35
            [2] => 9th, at Terrace plc
36
            [3] => Desert City
37
            [4] => CO
38
            [5] => 00123
39
        )
40
 
41
)