note 106408 added to function.simplexml-load-string
| From: | lb at bostontech dot net | Date: | Tue, 08 Nov 2011 06:40:45 +0000 |
| Subject: | note 106408 added to function.simplexml-load-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-184323@lists.php.net to get a copy of this message | ||
please note that:
<?
$data_array = (array) simplexml_load_string($xml_string);
?>
will only convert the root element to an array, where as the child elements remain XML objects.
To prove this, try returning a value N objects deep by association. Then try the same exercise
using something like the object2array example below. (Which works great).
----
Server IP: 117.55.229.1
Probable Submitter: 203.59.102.142
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-load-string.php
Edit -- https://master.php.net/note/edit/106408
Del: integrated -- https://master.php.net/note/delete/106408/integrated
Del: useless -- https://master.php.net/note/delete/106408/useless
Del: bad code -- https://master.php.net/note/delete/106408/bad+code
Del: spam -- https://master.php.net/note/delete/106408/spam
Del: non-english -- https://master.php.net/note/delete/106408/non-english
Del: in docs -- https://master.php.net/note/delete/106408/in+docs
Del: other reasons-- https://master.php.net/note/delete/106408
Reject -- https://master.php.net/note/reject/106408
Search -- https://master.php.net/manage/user-notes.php