Array
(
[user_id] => 5
[member_type] => 3
[member_name] => Abin
[email] => [email protected]
[username] => abin
[about_user] =>
[password] => e10adc3949ba59abbe56e057f20f883e
[description] =>
[membership_type] => 0
[joindate] => 0000-00-00 00:00:00
[membership_expirydate] => 0000-00-00 00:00:00
[image] =>
[active] => N
[approved] => Y
[varified] => N
[coach] => N
[paid_user] => N
[fb_unique_id] =>
[fb_access_tocken] =>
[gender] => M
[latitude] =>
[longitude] =>
[firstname] =>
[lastname] =>
[location] =>
[avg_speed] => 6-8 Miles/Hour
[twitter_tocken] =>
[twitter_tocken_secret] =>
[sponsor] => N
[no_of_runs] => 0
[rand] =>
[distance] =>
[country_id] =>
[state_id] =>
)
这是我的数组。我需要将这些值导出为excel。该阵列可以是多维的。
最佳答案
在这里,如果您的意思是数组键是您的列名,而不能使用array_keys,
$columns = array_keys($your_array);