Created
May 29, 2018 06:24
-
-
Save Guley/3a93b175c7d929e0d5523d560293413f to your computer and use it in GitHub Desktop.
This file contains 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
$buffer ='<xml><item><id>1</id><name>Test</name></item></xml>'; | |
$xml = new SimpleXMLElement($buffer); | |
$data = json_encode($xml, JSON_PRETTY_PRINT); | |
$data2 = json_decode($data); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment