【发布时间】:2014-04-11 19:22:59
【问题描述】:
我发现这个有用的脚本可以将 Google 电子表格转换为数组。 https://github.com/VernierSoftwareTechnology/google-spreadsheet-to-php-array/blob/master/google-spreadsheet-to-array.php
结果数组的格式为:
Array
(
[1] => Array
(
[A] => id
[B] => start_date
[C] => title
...
[2] => Array
(
[A] => 10551920077
[B] => 27/03/2014 19:00:00
[C] => Up and Down The City Road
)
and so on...
但我希望第一行值充当数组的键,例如:
Array
(
[2] => Array
(
[id] => 10551920077
[start_date] => 27/03/2014 19:00:00
[title] => Up and Down The City Road
)
and so on...
我尝试修改代码,但没有成功。 有什么帮助吗?
提前致谢! :)
【问题讨论】:
标签: php arrays google-apps-script spreadsheet