Skip to content

Instantly share code, notes, and snippets.

@Itachi261092
Created September 18, 2017 08:26
Show Gist options
  • Save Itachi261092/8a1bac703f5b58e19f4692342c5dd3c5 to your computer and use it in GitHub Desktop.
Save Itachi261092/8a1bac703f5b58e19f4692342c5dd3c5 to your computer and use it in GitHub Desktop.
xml to array parse
foreach (scandir(_FOLDER) as $xmlFile) {
if (!is_dir(_FOLDER . $xmlFile)) {
$xml = simplexml_load_file(_FOLDER . $xmlFile);
$array = json_decode(json_encode($xml), true);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment