$fc = new File_Convert($img->getStoreName(), $img->mimetype );
$csv = $fc->convert('text/csv');
$ret = $this->importCsv($csv);
+
+ print_R($ret);exit;
+
$this->jdata($ret['data'], false, isset($ret['extra']) ? $ret['extra'] : array() );
}
$cols = false;
$header = false;
$rows = array();
- $ret = array();
+ $extra = array();
while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) {
if(!array_filter($n)){
}
if(!$header){
- $ret[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1];
+ $extra[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1];
continue;
}
}
fclose($fh);
- return array('extra' => $ret, 'data' => $rows);;
+ $ret = array('extra' => $extra, 'data' => $rows);
+ echo 'about to return?';print_R($ret);exit;
+
+ return array('extra' => $extra, 'data' => $rows);;
}
}
\ No newline at end of file