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 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 Link to comment https://forums.phpfreaks.com/topic/176209-xml-to-array/#findComment-928623 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.