【发布时间】:2021-02-09 18:54:15
【问题描述】:
array (
'A' =>
array (
'topic' => 'My topic name',
'starttime' => '12/11/2018 16:30:00',
'endtime' => '12/11/2018 18:00:00',
'webinarid' => '1235',
'webinarkey' => '123518238123',
'orgkey' => '',
'regurl' => 'https://attendee.gotowebinar.com/register/xxx',
'description' => 'Long desc',
'newsletteremailid' => '321',
'ogimage' => 'https://xxx',
'presenterurl' => 'https://xxx',
'elite' => '1',
'postid' => '699599',
),
'B' =>
array (
'topic' => 'Topic title',
'starttime' => '12/4/2018 16:30:00',
'endtime' => '12/4/2018 18:00:00',
'webinarid' => '123512',
'webinarkey' => '8127317327132',
'orgkey' => '',
'regurl' => 'https://attendee.gotowebinar.com/register/xxx',
'description' => 'Topic description',
'newsletteremailid' => '316',
'ogimage' => 'https://xxx',
'presenterurl' => '',
'elite' => '1',
'postid' => '8235123'
)
)
我试图将每个嵌套数组从 0..x 转换为字母表。所以例如'topic'是'A','orgkey'是'F'。
然后返回一个新的多维数组('A' => array('A' => 'My topic name', 'B' => '12/11/2018 16:30:00'))等等.
【问题讨论】:
标签: php arrays multidimensional-array