i have this json code:
$dataB = <<<DATA
{
"actualArrivalDateTime":"2021-09-07T10:00",
"containerNumber:" "000",
"shipmentNumber": aaaa1,
"containerSequence":3,
"placeOfArrival": {
"pointSequence": 2
}
}
DATA;
I want to pass php var to containerNumber but doesn't work . For example, if i assign:
<? $contnr = "001"; ?>
then i tried to do this:
$dataB = <<<DATA
{
"actualArrivalDateTime":"2021-09-07T10:00",
"containerNumber:" ".$var.",
"shipmentNumber": aaaa1,
"containerSequence":3,
"placeOfArrival": {
"pointSequence": 2
}
}
DATA;
but dowsn't work... it says that the containerNumber is not valid... but if i write the containerNumber, not as variable, it works. Any help?