if (($handle = fopen($filename, 'r')) !== FALSE) {
$rowNumber = 0;
$output = array();
while (($row = fgetcsv($handle, 0, $delimiter)) !== FALSE) {
$num = count($row);
for ($i = 0; $i < $num; $i++) {
$output[$rowNumber][$i] = $row[$i];
}
$rowNumber++;
}
}
private function part($path, $offset, $rows) {
$buffer = array();
$buffer['content'] = '';
//$buffer['pointer'] = array();
$handle = fopen($path, "r");
fseek($handle, $offset);
if( $handle ) {
for( $i = 0; $i < $rows; $i++ ) {
$buffer['content'] .= fgets($handle);
//$buffer['pointer'] = mb_strlen($buffer['content']);
}
}
fclose($handle);
return($buffer);
}