note 110334 added to function.simplexml-load-string
| From: | AllenJB | Date: | Fri, 12 Oct 2012 08:09:09 +0000 |
| Subject: | note 110334 added to function.simplexml-load-string | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-191264@lists.php.net to get a copy of this message | ||
<?php
$xml = json_decode(json_encode((array) simplexml_load_string($string)), 1);
?>
A reminder that json_encode attempts to convert data to UTF-8 without specific knowledge of the
source encoding. This method can cause encoding issues if you're not working in UTF-8.
----
Server IP: 69.147.83.199
Probable Submitter: 81.5.166.5
----
Manual Page -- http://www.php.net/manual/en/function.simplexml-load-string.php
Edit -- https://master.php.net/note/edit/110334
Del: integrated -- https://master.php.net/note/delete/110334/integrated
Del: useless -- https://master.php.net/note/delete/110334/useless
Del: bad code -- https://master.php.net/note/delete/110334/bad+code
Del: spam -- https://master.php.net/note/delete/110334/spam
Del: non-english -- https://master.php.net/note/delete/110334/non-english
Del: in docs -- https://master.php.net/note/delete/110334/in+docs
Del: other reasons-- https://master.php.net/note/delete/110334
Reject -- https://master.php.net/note/reject/110334
Search -- https://master.php.net/manage/user-notes.php