i want to make this json details dynamic.currently its static.as a example i want declare few php variables for these json.
Here is my code
$body = '{
"outboundSMSMessageRequest": {
"address": [
"tel:+9456654978"
],
"senderAddress": "tel:+95623654978",
"outboundSMSTextMessage": {
"message": "Welcome to fgf Your Confirmation Code - "
},
"clientCorrelator": "",
"receiptRequest": {
"notifyURL": "",
"callbackData": ""
},
"senderName": ""
}
}';
As in here you can see json has declared to the $body.what i want to do is make separate variables such as $message,$address, $senderAddress and assign them to $body. how can i do this?
jsontoarrayafter adding do the re-convert for get the json again.json_encode