I have the following array:
Array
(
[0] => INBOX.Trash
[1] => INBOX.Sent
[2] => INBOX.Drafts
[3] => INBOX.Test.sub folder
[4] => INBOX.Test.sub folder.test 2
)
How can I convert this array to a multidimensional array like this:
Array
(
[Inbox] => Array
(
[Trash] => Array
(
)
[Sent] => Array
(
)
[Drafts] => Array
(
)
[Test] => Array
(
[sub folder] => Array
(
[test 2] => Array
(
)
)
)
)
)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…