Parsed ARRAY looks like this: array(1) { ["spies"]=> array(1) { ["spy"]=> array(4) { [0]=> array(4) { ["name"]=> string(10) "James Bond" ["email"]=> string(13) "mi5@london.uk" ["address"]=> string(26) "Wherever he is needed most" ["_attributes"]=> array(2) { ["id"]=> string(3) "007" ["type"]=> string(8) "SuperSpy" } } [1]=> array(4) { ["name"]=> string(8) "Number 6" ["email"]=> array(2) { ["_attributes"]=> array(2) { ["type"]=> string(7) "private" ["location"]=> string(6) "office" } ["_content"]=> string(13) "mi6@london.uk" } ["address"]=> string(22) "123 Island Prison Lane" ["_attributes"]=> array(2) { ["id"]=> string(1) "6" ["type"]=> string(10) "RetiredSpy" } } ["_num"]=> int(3) [2]=> array(4) { ["name"]=> string(16) "Inspector Gadget" ["email"]=> string(12) "lost@aol.com" ["friends"]=> array(1) { ["friend"]=> array(3) { [0]=> array(3) { ["name"]=> array(2) { ["first"]=> string(6) "little" ["last"]=> string(4) "girl" } ["age"]=> string(2) "12" ["hair"]=> array(1) { ["_attributes"]=> array(2) { ["color"]=> string(5) "brown" ["length"]=> string(4) "long" } } } [1]=> array(3) { ["name"]=> array(2) { ["first"]=> string(6) "smelly" ["last"]=> string(3) "dog" } ["age"]=> string(2) "14" ["hair"]=> array(1) { ["_attributes"]=> array(2) { ["color"]=> string(12) "dirtry blond" ["length"]=> string(5) "short" } } } ["_num"]=> int(2) } } ["_attributes"]=> array(2) { ["id"]=> string(2) "13" ["type"]=> string(13) "NotReallyASpy" } } } } } OUTPUT of fromArray() *with* OPTIONAL 'attributes' options set (for spy:id, email:location, hair:length, type, color) James Bond mi5@london.uk
Wherever he is needed most
Number 6 mi6@london.uk
123 Island Prison Lane
Inspector Gadget lost@aol.com little girl 12 smelly dog 14