草庐IT

authorLast

全部标签

php - 将 XML 转换为关联数组

有没有办法使用ZendFramework和PHP将XML转换为数组?我见过有人使用SimpleXML来做到这一点,但我想知道是否有通过ZendFramework的方法。示例XML,我想转换为数组:MarkTwainTheInnocentsAbroadCharlesDickensOliverTwist转换后的数组如下所示:Array([0]=>Array([authorFirst]=>Mark[authorLast]=>Twain[title]=>InnocentsAbroad)[1]=>Array([authorFirst]=>Charles[authorLast]=>Dickens[