soap响应从php中的webservice转换为json或数组

时间:2015-01-02 06:22:41

标签: php json soap

如何将以下xml print_r转换为array

stdClass Object ( [getStateListResult] => stdClass Object ( [any] => 1Andaman and Nicobar Islands2Andhra Pradesh4Arunachal Pradesh5Asia-Pacific6Assam9Bihar10Chhattisgarh11Delhi12Goa13Gujarat16Haryana17Himachal Pradesh18Jammu and Kashmir19Jharkhand20Karnataka21Kerala22Madhya Pradesh23Maharashtra24Manipur25Meghalaya26Nagaland28Orissa29Puducherry / Pondicherry30Punjab31Rajasthan32Sikkim33Tamil Nadu34Tripura35Uttar Pradesh36Uttarakhand / Uttaranchal37West Bengal39Chandigarh (UT)40Dadra and Nagar Haveli (UT)41Daman and Diu (UT)42Lakshadweep (UT)43Mizoram44NEPAL ) )
Array ( [0] => 1Andaman and Nicobar Islands2Andhra Pradesh4Arunachal Pradesh5Asia-Pacific6Assam9Bihar10Chhattisgarh11Delhi12Goa13Gujarat16Haryana17Himachal Pradesh18Jammu and Kashmir19Jharkhand20Karnataka21Kerala22Madhya Pradesh23Maharashtra24Manipur25Meghalaya26Nagaland28Orissa29Puducherry / Pondicherry30Punjab31Rajasthan32Sikkim33Tamil Nadu34Tripura35Uttar Pradesh36Uttarakhand / Uttaranchal37West Bengal39Chandigarh (UT)40Dadra and Nagar Haveli (UT)41Daman and Diu (UT)42Lakshadweep (UT)43Mizoram44NEPAL )

0 个答案:

没有答案