Skip to content

Instantly share code, notes, and snippets.

@lorenzoaiello
Created June 10, 2014 17:08
Show Gist options
  • Save lorenzoaiello/1a3e81ee2b1e42d8d6c5 to your computer and use it in GitHub Desktop.
Save lorenzoaiello/1a3e81ee2b1e42d8d6c5 to your computer and use it in GitHub Desktop.
Force XML to Array
$array = json_decode(json_encode((array) simplexml_load_string($xml_string)),1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment