Assign Json to php Variables

$body = '{
      "outboundSMSMessageRequest": {
        "address": [
          "tel:+9456654978"
        ],

        "senderAddress": "tel:+95623654978",
        "outboundSMSTextMessage": {
          "message": "Welcome to fgf  Your Confirmation Code - "
        },

        "clientCorrelator": "",
        "receiptRequest": {
          "notifyURL": "",
          "callbackData": ""
        },
        "senderName": ""
      }
    }';
$arr = json_decode($body, true);

Leave a comment

Your email address will not be published. Required fields are marked *