push xml data to an array code example
Example: php xml to array
public function xmlToArray($xmlstring){
$xml = simplexml_load_string($xmlstring, "SimpleXMLElement", LIBXML_NOCDATA);
$json = json_encode($xml);
$array = json_decode($json,TRUE);
return $array;
}