function xml_arr($xml){ $obj = simplexml_load_string($xml, 'SimpleXMLElement', LIBXML_NOCDATA); $json = json_encode($obj); $arr = json_decode($json, true); return $arr;}