note 111180 added to simplexmlelement.children

From: Date: Wed, 23 Jan 2013 08:29:01 +0000
Subject: note 111180 added to simplexmlelement.children
Groups: php.notes 
Request: Send a blank email to php-notes+get-193355@lists.php.net to get a copy of this message
--- From manual page: http://www.php.net/simplexmlelement.children --- hi, what do this method? this method have a output like paren object my xml: <?xml version="1.0" encoding="UTF-8"?> <modules> <module state='active'> <name>menu</name> <position>right</position> <params> <param name='id'>10</param> <param name='alaki'>forTest</param> </params> </module> <module state='deactive'> <name>amar</name> <position>35</position> </module> </modules> ------------------ $modules = simplexml_load_file($configFile); output "var_dump($modules);" is: --------------- object(SimpleXMLElement)#12 (1) { ["module"]=> array(2) { [0]=> object(SimpleXMLElement)#8 (4) { ["@attributes"]=> array(1) { ["state"]=> string(6) "active" } ["name"]=> string(4) "menu" ["position"]=> string(5) "right" ["params"]=> object(SimpleXMLElement)#13 (1) { ["param"]=> array(2) { [0]=> string(2) "10" [1]=> string(7) "forTest" } } } [1]=> object(SimpleXMLElement)#11 (3) { ["@attributes"]=> array(1) { ["state"]=> string(8) "deactive" } ["name"]=> string(4) "amar" ["position"]=> string(2) "35" } } } --------------- output "var_dump($modules->children());" is: --------------- object(SimpleXMLElement)#14 (1) { ["module"]=> array(2) { [0]=> object(SimpleXMLElement)#16 (4) { ["@attributes"]=> array(1) { ["state"]=> string(6) "active" } ["name"]=> string(4) "menu" ["position"]=> string(5) "right" ["params"]=> object(SimpleXMLElement)#18 (1) { ["param"]=> array(2) { [0]=> string(2) "10" [1]=> string(7) "forTest" } } } [1]=> object(SimpleXMLElement)#17 (3) { ["@attributes"]=> array(1) { ["state"]=> string(8) "deactive" } ["name"]=> string(4) "amar" ["position"]=> string(2) "35" } } } --------------- they have like BEHAVIOR in foreach ---- Server IP: 69.147.83.199 Probable Submitter: 46.225.44.25 ---- Manual Page -- http://php.net/manual/en/simplexmlelement.children.php Edit -- https://master.php.net/note/edit/111180 Del: integrated -- https://master.php.net/note/delete/111180/integrated Del: useless -- https://master.php.net/note/delete/111180/useless Del: bad code -- https://master.php.net/note/delete/111180/bad+code Del: spam -- https://master.php.net/note/delete/111180/spam Del: non-english -- https://master.php.net/note/delete/111180/non-english Del: in docs -- https://master.php.net/note/delete/111180/in+docs Del: other reasons-- https://master.php.net/note/delete/111180 Reject -- https://master.php.net/note/reject/111180 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#193355) next »