Handling "" in DataGrid CSV

From: Date: Tue, 23 Jan 2007 17:34:45 +0000
Subject: Handling "" in DataGrid CSV
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-26400@lists.php.net to get a copy of this message
The following csv-file: "22-01-2007";"Some text";"-220,00";"135,73" "10-01-2007";"Some other text";"-45,00";"355,73" Could be handled in the datagrid the following way: require 'Structures/DataGrid.php'; $options = array(
      'delimiter' => ';',
      'header' => false
); $dg = & new Structures_Datagrid(); $dg->bind($csv_file, $options, 'CSV'); $dg->render('Console'); That would render as this: +--------------+-------------------+-----------+----------+
| 0            | 1                 | 2         | 3        |
+--------------+-------------------+-----------+----------+
| "22-01-2007" | "Some text"       | "-220,00" | "135,73" |
| "10-01-2007" | "Some other text" | "-45,00" | "355,73" | +--------------+-------------------+-----------+----------+ But how will one handle the ". Can DataGrid_DataSource_CSV be told how to handle the "? -- Lars Olesen Gratis backup https://mozy.com/?code=9MYJPF

« previous php.pear.general (#26400) next »