$res = '<?xml version="1.0" encoding="utf-8" ?><returnsms>
<returnstatus>Success</returnstatus>
<message>ok</message>
<remainpoint>1</remainpoint>
<taskID>11513955</taskID>
<successCounts>1</successCounts></returnsms>';

$xml = simplexml_load_string($res); // 返回对象
$json = json_encode($xml); // encode
$array = json_decode($json,TRUE); // decode成数组
array(5) {
  ["returnstatus"] => string(7) "Success"
  ["message"] => string(2) "ok"
  ["remainpoint"] => string(1) "1"
  ["taskID"] => string(8) "11513955"
  ["successCounts"] => string(1) "1"
}

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-22
  • 2022-12-23
  • 2022-12-23
  • 2021-12-21
  • 2022-02-02
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案