object(stdClass)#8 (2) { ["schema"]=> string(894) "" ["any&q"/> object(stdClass)#8 (2) { ["schema"]=> string(894) "" ["any&q">

Home  >  Article  >  Backend Development  >  调用接口有关问题

调用接口有关问题

WBOY
WBOYOriginal
2016-06-13 10:14:171244browse

调用接口问题
返回的数据用var_dump输出是:

object(stdClass)#7 (2) { ["GetCustomerListResult"]=> object(stdClass)#8 (2) { ["schema"]=> string(894) "" ["any"]=> string(21628) "
[email protected]:14:47+08:0043889信息技术有限公司
信息技术有限公司
[email protected]:20:45+08:0043891教育
商务大厦东三楼
[email protected]:27:01+08:0043893留学
国际大厦1号楼
[email protected]:30:17+08:0043894国联
北园18-19幢
[email protected]:32:21+08:0043896教育
浙江
[email protected]:34:29+08:0097479上海
上海
[email protected]:01:56+08:0097688南京
南京
[email protected]:40:49+08:0097690广州
广州
[email protected]:51:40+08:0097691深圳
深圳
[email protected]:53:56+08:0097692苏州
苏州
[email protected]:56:23+08:0097693常州
常州
[email protected]:58:26+08:0097699无锡
无锡

现在要把它处理好保存到数据库……
怎么办?

------解决方案--------------------
$str=$obj->GetCustomerListResult->any; 得到字符串,然后用正则函数、字符函数把字符串处理好,再入库
------解决方案--------------------

PHP code
$s = $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);<div class="clear">
                 
              
              
        
            </div>
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn