from the below Code 2 references Code 2 via $sendData. I would like to completely remove Code 1, and only using Code 2. Can I please get help writing code 1 into code 2, perhaps in form of array
CODE 1
$sendData = '{ "messages" : [ { "content" : "Hello", "destination" : "0718860000" } ] }';
CODE 2
$options = array(
'http' => array(
'header' => array("Content-Type: application/json", $authHeader),
'method' => 'POST',
'content' => $sendData,
)
);