From 87502835a453994549ac5ec7bed641ffdfde085e Mon Sep 17 00:00:00 2001 From: Mark Crane Date: Sat, 14 Jun 2014 08:00:10 +0000 Subject: [PATCH] Update the CDR details --- app/xml_cdr/xml_cdr_details.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/app/xml_cdr/xml_cdr_details.php b/app/xml_cdr/xml_cdr_details.php index ea8c4e0f1a..6fe57a48ea 100644 --- a/app/xml_cdr/xml_cdr_details.php +++ b/app/xml_cdr/xml_cdr_details.php @@ -84,10 +84,10 @@ else { //parse the xml to get the call detail record info try { if ($format == 'json') { - $xml = json_decode($json_string); + $array = json_decode($json_string,true); } - if ($format == 'json') { - $xml = simplexml_load_string($xml_string); + if ($format == 'xml') { + $array = json_decode(json_encode((array)simplexml_load_string($xml_string)),true); } } catch(Exception $e) { @@ -97,6 +97,10 @@ else { //get the header require_once "resources/header.php"; +print_r($array); + +exit; + //page title and description echo "
"; echo "\n";