I am trying to convert xml to json in php. If I do a simple convert using simple xml and json_encode none of the attributes in the xml show.
$xml = simplexml
Json & Array from XML in 3 lines:
$xml = simplexml_load_string($xml_string); $json = json_encode($xml); $array = json_decode($json,TRUE);