in the code below, i would like to get the id and result code
{
"data": {
"transaction": {
"id": "K3446tdgt08pe5QRgQ879",
"status": "Success."
}
},
"status": {
"message": "Success.",
"code": "200",
"resultcode": "ESB000010",
"success": true
}
}
I am expecting $json_string include the JSON result.
<?php
$array = json_decode($json_string, true);
echo $array ["data"]["transaction"]["id"];
?>