I would like to convert these strings into a combined nested array:
array(
'item1:item2:itemx',
'item1:item2:itemy',
'itemz'
)
To
array(
'item1' => array(
'item2' => array(
'itemx' => array(),
'itemy' => array(),
)
)
'itemz' => array()
)
Is there a way to do this with explode/foreach loop?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…