daily pastebin goal
63%
SHARE
TWEET

Untitled

a guest May 17th, 2018 128 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
Top