note 75582 added to ref.xml

From: Date: Wed, 06 Jun 2007 16:57:02 +0000
Subject: note 75582 added to ref.xml
Groups: php.notes 
Request: Send a blank email to php-notes+get-127254@lists.php.net to get a copy of this message
function convert_xml2array(&$result,$root,$rootname='root'){ $n=count($root->children()); if ($n>0){ foreach ($root->children() as $child){ $name=$child->getName(); convert_xml2array($result[$rootname][],$child,$name); } } else { $result[$rootname]= (array) $root; if (!isset($result[$rootname]['@attributes'])){ $result[$rootname]['@attributes']=array(); } } } function get_array_fromXML($xml){ $result=array(); $doc=simplexml_load_string($xml); convert_xml2array($result,$doc); return $result['root']; } ---- Server IP: 81.92.200.26 Probable Submitter: 85.240.105.53 ---- Manual Page -- http://www.php.net/manual/en/ref.xml.php Edit -- https://master.php.net/note/edit/75582 Del: integrated -- https://master.php.net/note/delete/75582/integrated Del: useless -- https://master.php.net/note/delete/75582/useless Del: bad code -- https://master.php.net/note/delete/75582/bad+code Del: spam -- https://master.php.net/note/delete/75582/spam Del: non-english -- https://master.php.net/note/delete/75582/non-english Del: in docs -- https://master.php.net/note/delete/75582/in+docs Del: other reasons-- https://master.php.net/note/delete/75582 Reject -- https://master.php.net/note/reject/75582 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127254) next »