$status_key ="status"$response = {"error":false,"data":{"id":16420728,"order_id":"5000","mobile_no":"9995088810","amount":20,"balance":46.89,"status":"failure","tnx_id":"","response":"Transaction Failed"}}"$result = json_decode($response);这打印:{ ["error"]=> bool(false) ["data"]=> object(stdClass)#24 (8) { ["id"]=> int(16420728) ["order_id"]=> string(4) "5000" ["mobile_no"]=> string(10) "9995088810" ["amount"]=> int(20) ["balance"]=> float(46.89) ["status"]=> string(7) "failure" ["tnx_id"]=> string(0) "" ["response"]=> string(18) "Transaction Failed" }}现在我正在检查指定的密钥var_dump(array_key_exist(status_key,result));当我执行var_dump()此功能时,它返回"bool(false)"
1 回答
- 1 回答
- 0 关注
- 124 浏览
添加回答
举报
0/150
提交
取消