The data returned by calling an interface question is output using var_dump: object (stdClass) #7 (2) {[& quot; GetCustomerListResult & quot;] = & gt; object (stdClass) #8 (2) {[& quot; schema & quot;] = & gt; interface call problems
The returned data is output using var_dump:
Object (stdClass) #7 (2) {["GetCustomerListResult"] => object (stdClass) #8 (2) {["schema"] => string (894) "" ["any"] => string (21628 )"
0.1000hzbfcsqyglv@xxx.cn2011-10-19T15: 14: 47 + 08: 0043889 Information Technology Co., Ltd.
Information Technology Co., Ltd.
0.3000hzbfxxjsglv@xxx.cn2011-10-19T15: 20: 45 + 08: 0043891 education
Third floor, east of Business Building
0.3000jsjyglv@xxx.cn2011-10-19T15: 27: 01 + 08: 0043893 study abroad
Building 1, International Tower
0.3000ucasliuxueglv@xxx.cn2011-10-19T15: 30: 17 + 08: 0043894
Building 18-19, North Park
0.3000zgglglv@xxx.cn2011-10-19T15: 32: 21 + 08: 0043896 education
Zhejiang
0.3000xdjyglv@xxx.cn2011-10-19T15: 34: 29 + 08: 0097479 Shanghai
Shanghai
0.3000shjrglv@xxxx.cn2011-12-09T12: 01: 56 + 08: 0097688 Nanjing
Nanjing
0.3000njjrglv@xxx.cn2011-12-09T13: 40: 49 + 08: 0097690 Guangzhou
Guangzhou
0.3000gzjrglv@xx.cn2011-12-09T13: 51: 40 + 08: 0097691 Shenzhen
Shenzhen
0.3000szjrglv@xx.cn2011-12-09T13: 53: 56 + 08: 0097692 Suzhou
Suzhou
0.3000suzjrglv@xx.cn2011-12-09T13: 56: 23 + 08: 0097693 Changzhou
Changzhou
0.3000czjrglv@xx.cn2011-12-09T13: 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 = <TXT0.1000hzbfcsqyglv@xxx.cn2011-10-19T15: 14: 47 + 08: 0043889 Information Technology Co., 0.3000hzbfxxjsglv@xxx.cn2011-10-19T15: 20: 45 + 08: 0043891 education business building East third floor 0.3000jsjyglv@xxx.cn2011-10-19T15: 27: 01 + 08: 0043893 Study Abroad International Building 1 floor 0.3000ucasliuxueglv@xxx.cn2011-10-19T15: 30: 17 + 08: 0043894 State Union North Park 18-19 building 0.3000zgglglv@xxx.cn2011-10-19T15: 32: 21 + 08: 0043896 education Zhejiang 0.3000xdjyglv@xxx.cn2011-10-19T15: 34: 29 + 08: 0097479 Shanghai 0.3000shjrglv@xxxx.cn2011-12-09T12: 01: 56 + 08: 0097688 Nanjing 0.3000njjrglv@xxx.cn2011-12-09T13: 40: 49 + 08: 0097690 Guangzhou 0.3000gzjrglv@xx.cn2011-12-09T13: 51: 40 + 08: 0097691 Shenzhen 0.3000szjrglv@xx.cn2011-12-09T13: 53: 56 + 08: 0097692 Suzhou 0.3000suzjrglv@xx.cn2011-12-09T13: 56: 23 + 08: 0097693 Changzhou 0.3000czjrglv@xx.cn2011-12-09T13: 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 );