1.csv文件上传,批量添加到数据库中。取到了CSV文件数据到 $arr。需要批量修改键名。求大神帮忙。
Array
(
[0] => Array
(
[0] => id
[1] => pid
[2] => company
[3] => department
[4] => position
[5] => name
[6] => tel
[7] => mobile
[8] => fax
[9] => email
[10] => remark
)
[1] => Array
(
[0] => 10268
[1] => 139
[2] => 勘探与生产分公司
[3] => 营销部
[4] => 总经理
[5] => 周杰伦
[6] => 556666
[7] =>
[8] =>
[9] =>
[10] =>
)
[2] => Array
(
[0] => 100162
[1] => 139
[2] => 勘探与生产分公司
...
需要的结果是Array
(
[0] => Array
(
[id] =>
[pid] =>
[company] =>
[department] =>
[position] =>
[name] =>
[tel] =>
[mobile] =>
[fax] =>
[email] =>
[remark] =>
)
[1] => Array
(
[id] =>
[pid] =>
[company] =>
[department] =>
[position] =>
[name] =>
[tel] =>
[mobile] =>
[fax] =>
[email] =>
[remark] =>
)