ohdang888 Posted October 1, 2009 Share Posted October 1, 2009 is there a function built (in the php library) that turns an xml document into an array? If not, is there any lightweight ones out there built? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/176209-xml-to-array/ Share on other sites More sharing options...
p2grace Posted October 1, 2009 Share Posted October 1, 2009 If it's an xml string you can use SimpleXMLElement(): http://us2.php.net/manual/en/simplexml.examples-basic.php If its a file you can use simplexml_load_file(): http://us2.php.net/manual/en/function.simplexml-load-file.php Quote Link to comment https://forums.phpfreaks.com/topic/176209-xml-to-array/#findComment-928623 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.