Warning: Invalid argument supplied for foreach() in /home/jihswbiz/public_html/t6.gwilt.org/refDox.php on line 212
Docs-XMLtoArray

 

ReLoad

Keys


Functions

arraybrowsercolorcookiedatetimeDBdebugdeviceDSTequiverrorflagsfontformatgeo
holidayhtmlisjsonmathparsePHPprintsearchsortstringtabletexttracetype
VOTDweatherxml

Function  XMLtoArray   Lines 284-299 (15 lines)Updated: 2012-04-18 file  utilsJson.php   Last mod: Mon 2021-02-22 18:04:09

function XMLtoArray($xml)
        {
#-k     array   xml
#-d     4/18/12 Updated
#-c     http://www.php.net/manual/en/book.simplexml.php#108039
        
$array json_decode(json_encode($xml), TRUE);
         
        foreach ( 
array_slice($array0) as $key => $value )
                {
                if ( empty(
$value) ) $array[$key] = NULL;
                elseif ( 
is_array($value) ) $array[$key] = toArray($value);
                }

        return 
$array;
        }

?>