codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
<?php $string = '<?xml version="1.0" encoding="utf-16"?> <Response Version="1.0"> <DateTime>2/13/2013 10:37:24 PM</DateTime> <Contact_ID>151-233-DD</Contact_ID> <Quote_ID>ojc332-ewied-23e3ed</Quote_ID> <Status>Failure</Status> <Reason>Incorrect Contact ID</Reason> </Response>' ; $xml = simplexml_load_string(preg_replace('/(<\?xml[^?]+?)utf-16/i', '$1utf-8', $string)); echo "<pre>";print_r($xml); ?>
Private
[
?
]
Run code
Submit