We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5b1f359 commit 85925a1Copy full SHA for 85925a1
1 file changed
src/CSV.php
@@ -97,6 +97,17 @@ function parse($data) {
97
//Throw error header not found
98
throw new Exception('Error: Header not found');
99
}
100
+ } else {
101
+ if($this->headerOffset == 0) {
102
+ //Remove header from data
103
+ array_shift($rawData);
104
+ } else if(isset($rawData[$this->headerOffset])) {
105
106
+ unset($rawData[$this->headerOffset]);
107
108
+ //Throw error header not found
109
+ throw new Exception('Error: Header not found');
110
+ }
111
112
//Parse body data
113
$parseData = [];
0 commit comments