Headers

cust_data:

[{“cust_name”:””,”cust_mobile”:”18765900001″},{“cust_name”:””,”cust_mobile”:”18765900002″}]
php:
$cust_data = I(‘post.cust_data’);
p($cust_data);

[{"cust_name":"","cust_mobile":"18765900001"},{"cust_name":"","cust_mobile":"18765900002"}]

 $cust_data = htmlspecialchars_decode($cust_data);
p($cust_data);

[{“cust_name”:””,”cust_mobile”:”18765900001″},{“cust_name”:””,”cust_mobile”:”18765900002″}]

$cust_data = json_decode($cust_data, true);

Array
(
[0] => Array
(
[cust_name] =>
[cust_mobile] => 18765900001
)

[1] => Array
(
[cust_name] =>
[cust_mobile] => 18765900002
)

)

参考:

php解析ajax传输的json null

作者 admin

百度广告效果展示