kucing Posted June 30, 2008 Share Posted June 30, 2008 Hi there, Here is the xmy data which I want to convert into array any help will be very appreciated. <userinfo> <user>test</user> <age>24</age> <country>japan</country> <city>heaven</city> </userinfo> into Array ( [0] => Array ( [0] => user="test" [1] => age="24" [2] => country="japan" [3] => city="heaven" ) [1] => Array ( [0] => user [1] => age [2] => country [3] => city ) [2] => Array ( [0] => test [1] => 24 [2] => japan [3] => heaven ) ) Thanks Link to comment https://forums.phpfreaks.com/topic/112571-help-with-xml-data-parse/ Share on other sites More sharing options...
effigy Posted June 30, 2008 Share Posted June 30, 2008 Have you tried SimpleXML? Link to comment https://forums.phpfreaks.com/topic/112571-help-with-xml-data-parse/#findComment-578240 Share on other sites More sharing options...
kucing Posted June 30, 2008 Author Share Posted June 30, 2008 effigy thanks for the reply. Actually the data coming is kinda dynamic. so i was thinking if i can get a way to make it auto detect and arrange something like http://us3.php.net/manual/en/function.xml-parse.php the last example. Link to comment https://forums.phpfreaks.com/topic/112571-help-with-xml-data-parse/#findComment-578252 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.