convert xml to array
$xml = simplexml_load_string($xml, null, LIBXML_NOCDATA); $json = json_encode($xml); $array = json_decode($json, true);