19 require_once(BASE.
"wcmf/lib/util/class.Message.php");
53 $csv = fopen($filename,
'r');
58 $result[
'values'] = array();
63 $line = fgets($csv, 4096);
64 if (strlen($line) > 0)
67 array_push($result[
'values'], $values);
82 if (in_array($fieldName, $this->_fields))
83 return $line[array_search($fieldName, $this->_fields)];
94 function getValues($line, $separator, $fielddelimiter)
97 $values = preg_split(
"/".$separator.
"/", $line);
100 if (strlen($fielddelimiter) > 0)
101 for($i=0; $i<
sizeof($values); $i++)
102 $values[$i] = trim($values[$i], $fielddelimiter);
readCSVFile($filename, $separator, $fielddelimiter)
getFieldValue($line, $fieldName)
CSVUtil provides basic support for csv file functionality. The first line of a csv file is supposed t...
getValues($line, $separator, $fielddelimiter)