The data returned by calling the interface problems is output using var_dump: object (stdClass) #7 (2) {[& quot; GetCustomerListResult & quot;] & gt; object (stdClass) #8 (2) {[& quot; schema & quot;] & gt; string (894) & quot; [& quot; any & q call interface problems
The returned data is output using var_dump:
Object (stdClass) #7 (2) {["GetCustomerListResult"] => object (stdClass) #8 (2) {["schema"] => string (894) "" ["any"] => string (21628 )"
[Email protected]: 14: 47 + 08: 0043889 Information Technology Co., Ltd.
Information Technology Co., Ltd.
[Email protected]: 20: 45 + 08: 0043891 education
Third floor, east of Business Building
[Email protected]: 27: 01 + 08: 0043893 study abroad
Building 1, International Tower
[Email protected]: 30: 17 + 08: 0043894
Building 18-19, North Park
[Email protected]: 32: 21 + 08: 0043896 education
Zhejiang
[Email protected]: 34: 29 + 08: 0097479 Shanghai
Shanghai
[Email protected]: 01: 56 + 08: 0097688 Nanjing
Nanjing
[Email protected]: 40: 49 + 08: 0097690 Guangzhou
Guangzhou
[Email protected]: 51: 40 + 08: 0097691 Shenzhen
Shenzhen
[Email protected]: 53: 56 + 08: 0097692 Suzhou
Suzhou
[Email protected]: 56: 23 + 08: 0097693 Changzhou
Changzhou
[Email protected]: 58: 26 + 08: 0097699 Wuxi
Wuxi
Now we need to process it and save it to the database ......
What should I do?
------ Solution --------------------
$ Str = $ obj-> GetCustomerListResult-> any; get the string, use the regular function and character function to process the string, and then store it into the database.
------ Solution --------------------
PHP code
$ S = <TXT [email protected]: 14: 47 + 08: 0043889 Information Technology Co., Ltd. Information Technology Co., Ltd. [email protected]: 20: 45 + 08: 0043891 education business building East third floor [email protected]: 27: 01 + 08: 0043893 Study Abroad International Building 1 floor [email protected]: 30: 17 + 08: 0043894 [email protected]: 32: 21 + 08: 0043896 education Zhejiang [email protected]: 34: 29 + 08: 0097479 Shanghai [email protected]: 01: 56 + 08: 0097688 Nanjing [email protected]: 40: 49 + 08: 0097690 Guangzhou [email protected]: 51: 40 + 08: 0097691 Shenzhen [email protected]: 53: 56 + 08: 0097692 Suzhou [email protected]: 56: 23 + 08: 0097693 Changzhou [email protected]: 58: 26 + 08: 0097699 Wuxi TXT; preg_match_all ("/^ ([\ d.] +) ([a-z @.] +) ([-\ d: + T] +) \ d {5 }(. +)/im ", $ s, $ r); foreach ($ r [1] as $ I => $ v) {$ res [] = array ('price' => $ v, 'Email '=> $ r [2] [$ I], 'date' => date ('Y-m-d H: I: S', strtotime (str_replace ('t ','', $ r [3] [$ I]), 'customer' => $ r [4] [$ I],);} print_r ($ res );