note 106408 deleted from function.simplexml-load-string by cmb
| From: | cmb@php.net | Date: | Sun, 15 Dec 2019 10:10:45 +0000 |
| Subject: | note 106408 deleted from function.simplexml-load-string by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-213527@lists.php.net to get a copy of this message | ||
Note Submitter: lb at bostontech dot net
----
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).