62 $this->separator = $a_sep;
74 $this->delimiter = $a_del;
86 $this->length = $a_length;
89 public function open($file =
"")
92 $this->line_ends = ini_get(
"auto_detect_line_endings");
93 ini_set(
"auto_detect_line_endings",
true);
101 ini_set(
"auto_detect_line_endings", $this->line_ends);
103 return(@fclose($this->ptr_file));
117 while (($line = fgetcsv($this->ptr_file, $this->length, $this->separator)) !==
false) {
118 for ($col = 0; $col < count($line); $col++) {
119 $this->data[$row][$col] = $this->
unquote($line[$col]);
136 return str_replace($this->delimiter . $this->delimiter, $this->delimiter, $a_str);
An exception for terminatinating execution or to throw for unit testing.
unquote($a_str)
@access private
setDelimiter($a_del)
Set delimiter.
__construct()
Constructor.
setLength($a_length)
Set length.
getDataArrayFromCSVFile()
Get data as array from csv file.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled