Hi guys need some little help. So I have a API that will pass a json data into another API.
The message/json must look like this:
[{
"MsgId": 1,
"MsgDate": "10/18/2016 11:10:23",
"Location": "L10129",
"TruckNo": "AFA6790",
"TruckerNo": "T1694",
"DriverName": "FRANKLIN PALOR GARCIA",
"MobileNo": "1234567890",
"Details": [{
"ReferenceNo": "DUMMY_REF1",
"Origin": "Sucat",
"Destination": "AIMS-GEN Trias Cavite City",
"Consignee": "Juan Dela Cruz",
"ReferenceNo2": "DUMMY_REF2"
},{
"ReferenceNo": "DUMMY_REF3",
"Origin": "Sucat",
"Destination": "AIMS-GEN Trias Cavite City",
"Consignee": "Juan Tamad",
"ReferenceNo2": "DUMMY_REF4"
}]
}]
However, I can't do it.It returns a internal server error. Here is my sample code for the json:
$array[]=array(
"MsgID"=>"1",
"MsgDate"=>"10/18/2016 11:10:23",
"Location"=>"L10129",
"TruckNo"=>"AFA6790",
"Details":[array(
"ReferenceNo"=>"DUMMY_REF1"
)]
);
echo json_encode($array);
Can someone help me on this problem? Thank you