print_r(json_decode($data));exit;
stdClass Object
(
[openId] => oXAn10DtGNKDz421q_ATefmwAgrI
[nickName] => 朝游东海
[gender] => 1
[language] => zh_CN
[city] =>
[province] =>
[country] =>
[avatarUrl] => https://wx.qlogo.cn/mmopen/vi_32/HvsSkXDC0A2hxOHictAG4gJunWdznmxAAyxjXpP53Getslo4AfbkhDsvNnVqXmwOqOxRPDDy3m53Jahcn7EACnA/132
[watermark] => stdClass Object
(
[timestamp] => 1528705900
[appid] => wx21d0c78aba5a30b1
)
)
获取值
$tempData = json_decode($data,true);
$temp['name'] = $tempData['nickName'];
使用true,转数组,然后通过数组获取值