21,886
社区成员
发帖
与我相关
我的任务
分享
$re = '/"body":"([^"]+)",/';
$str = '{"returnCode":"0","resultCode":"0","sign":"19333CD7F9710A104DA5D815709697D2","outChannelNo":"2017120100401000000017","status":"02","mchId":"000000010000000002","channel":"wxPubQR","body":"收单支付","outTradeNo":"20171201150337579753","amount":0.01,"transTime":"20171201150337"}';
preg_match_all($re, $str, $matches[1]);
print_r($matches);
$re = '/"body":"([^"]+)"/';
$str = '{"returnCode":"0","resultCode":"0","sign":"19333CD7F9710A104DA5D815709697D2","outChannelNo":"2017120100401000000017","status":"02","mchId":"000000010000000002","channel":"wxPubQR","body":"收单支付","outTradeNo":"20171201150337579753","amount":0.01,"transTime":"20171201150337"}';
preg_match_all($re, $str, $matches);
print_r($matches[1]);