Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $xml = simplexml_load_string(file_get_contents($path));
- $result = $xml->xpath("//configuration[@environment='{$env}']/settings[@prefix='file']/setting");
- foreach($result as $row) {
- $key = (string) $row->attributes();
- $data[$key] = json_decode((string) $row,true);
- }
Add Comment
Please, Sign In to add comment