projects
/
Pman.Core
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a734576
)
ExcelToJson.php
author
Alan Knowles
<alan@roojs.com>
Mon, 1 Apr 2013 09:05:22 +0000
(17:05 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 1 Apr 2013 09:05:22 +0000
(17:05 +0800)
ExcelToJson.php
patch
|
blob
|
history
diff --git
a/ExcelToJson.php
b/ExcelToJson.php
index
25b298b
..
39696cf
100644
(file)
--- a/
ExcelToJson.php
+++ b/
ExcelToJson.php
@@
-51,7
+51,7
@@
class Pman_Core_ExcelToJson extends Pman_Roo
$cols = false;
$header = false;
$rows = array();
$cols = false;
$header = false;
$rows = array();
- $
ret
= array();
+ $
extra
= array();
while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) {
if(!array_filter($n)){
while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) {
if(!array_filter($n)){
@@
-63,7
+63,7
@@
class Pman_Core_ExcelToJson extends Pman_Roo
}
if(!$header){
}
if(!$header){
- $
ret
[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1];
+ $
extra
[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1];
continue;
}
continue;
}
@@
-89,6
+89,6
@@
class Pman_Core_ExcelToJson extends Pman_Roo
}
fclose($fh);
}
fclose($fh);
- return array('extra' => $
ret
, 'data' => $rows);;
+ return array('extra' => $
extra
, 'data' => $rows);;
}
}
\ No newline at end of file
}
}
\ No newline at end of file