Skip to content

Instantly share code, notes, and snippets.

@hyperized
Created November 4, 2013 19:18
Show Gist options
  • Save hyperized/7307764 to your computer and use it in GitHub Desktop.
Save hyperized/7307764 to your computer and use it in GitHub Desktop.
Handy XML to Array shortcut
<?php
// Source: http://stackoverflow.com/a/18707244
//convert the XML result into array
$array_data = json_decode(json_encode(simplexml_load_string($data)), true);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment