xml格式转成array

<?php
$str='<xml><node><![CDATA[content]]></node></xml>';
$res = @simplexml_load_string($str,NULL,LIBXML_NOCDATA);
$res = json_decode(json_encode($res),true);
print_r($res);

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-11-28
  • 2021-11-05
  • 2022-12-23
  • 2021-11-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案