From 8e393c49eac2a2698f298d882fa29ce5aaf13ee4 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 1 Apr 2013 17:05:22 +0800 Subject: [PATCH] ExcelToJson.php --- ExcelToJson.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ExcelToJson.php b/ExcelToJson.php index 25b298bf..39696cfc 100644 --- a/ExcelToJson.php +++ b/ExcelToJson.php @@ -51,7 +51,7 @@ class Pman_Core_ExcelToJson extends Pman_Roo $cols = false; $header = false; $rows = array(); - $ret = array(); + $extra = array(); while(false !== ($n = fgetcsv($fh,10000, ',', '"'))) { if(!array_filter($n)){ @@ -63,7 +63,7 @@ class Pman_Core_ExcelToJson extends Pman_Roo } if(!$header){ - $ret[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1]; + $extra[preg_replace(array('/\s/', '/\:/'), '', $n[0])] = $n[1]; continue; } @@ -89,6 +89,6 @@ class Pman_Core_ExcelToJson extends Pman_Roo } fclose($fh); - return array('extra' => $ret, 'data' => $rows);; + return array('extra' => $extra, 'data' => $rows);; } } \ No newline at end of file -- 2.39.2