Guest User

Untitled

a guest
May 17th, 2018
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.27 KB | None | 0 0
  1. $xml = simplexml_load_string(file_get_contents($path));
  2. $result = $xml->xpath("//configuration[@environment='{$env}']/settings[@prefix='file']/setting");
  3. foreach($result as $row) {
  4. $key = (string) $row->attributes();
  5. $data[$key] = json_decode((string) $row,true);
  6. }
Add Comment
Please, Sign In to add comment