Created
July 7, 2011 16:17
-
-
Save davidgolding/1069880 to your computer and use it in GitHub Desktop.
XML to PHP array or JSON string in PHP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$json = json_encode(new SimpleXMLElement($xmlString, LIBXML_NOCDATA)); | |
$xmlArray = json_decode($json, true); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment