企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持知识库和私有化部署方案 广告
``` /* xml转成数组 */ function xmlstr_to_array($xmlstr){//xml字符串转数组 $ob= simplexml_load_string($xmlstr,'SimpleXMLElement', LIBXML_NOCDATA);//将字符串转化为变量 $json = json_encode($ob);//将对象转化为JSON格式的字符串 $configData = json_decode($json, true);//将JSON格式的字符串转化为数组 return $configData; } ```